fix linting errors

This commit is contained in:
2018-04-03 19:19:11 +02:00
parent 3f0b1ccbcd
commit 5d6b4a5255
4 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ export default Component.extend({
isValidAddress: function() {
// TODO: add proper address validation
return this.get('newContributor.address') !== ''
return this.get('newContributor.address') !== '';
}.property('kredits.web3', 'newContributor.address'),
isValidName: function() {
+1 -1
View File
@@ -19,7 +19,7 @@ export default Component.extend({
isValidRecipient: computed('proposal.recipientAddress', function() {
// TODO: add proper address validation
return this.get('proposal.recipientAddress') !== ''
return this.get('proposal.recipientAddress') !== '';
}),
isValidAmount: computed('proposal.amount', function() {
+3 -1
View File
@@ -101,7 +101,9 @@ export default Ember.Controller.extend({
_handleProposalVoted(proposalId, voter, totalVotes) {
this.get('model.proposals')
.findBy('id', proposalId.toNumber())
.incrementProperty('votesCount', 1);
.setProperties({
'votesCount', totalVotes
});
},
_handleTransfer(data) {
+1 -1
View File
@@ -46,7 +46,7 @@ export default Service.extend({
debug('[kredits] Creating new instance from npm module class');
let providerUrl = localStorage.getItem('config:web3ProviderUrl') || config.web3ProviderUrl;
let networkId = web3.version.network;
web3Provider = new ethers.providers.Web3Provider(web3.currentProvider, {chainId: network});
web3Provider = new ethers.providers.JsonRpcProvider(providerUrl, {chainId: network});
}
this.set('web3Provider', web3Provider);