Fix linting errors

This commit is contained in:
2019-03-27 00:24:15 +01:00
parent bfa0b350ac
commit 1fb20b1d08
9 changed files with 80 additions and 53 deletions
+8 -3
View File
@@ -16,6 +16,8 @@ export default Service.extend({
currentUserAccounts: null, // default to not having an account. this is the wen web3 is loaded.
currentUser: null,
contributors: null,
proposals: null,
currentUserIsContributor: notEmpty('currentUser'),
currentUserIsCore: alias('currentUser.isCore'),
hasAccounts: notEmpty('currentUserAccounts'),
@@ -23,6 +25,12 @@ export default Service.extend({
return this.currentUserAccounts && isEmpty(this.currentUserAccounts);
}),
init () {
this._super(...arguments);
this.set('contributors', []);
this.set('proposals', []);
},
// this is called in the routes beforeModel(). So it is initialized before everything else
// and we can rely on the ethProvider and the potential currentUserAccounts to be available
getEthProvider: function() {
@@ -84,9 +92,6 @@ export default Service.extend({
return this.kredits.Token.functions.totalSupply();
}),
contributors: [],
proposals: [],
loadContributorsAndProposals() {
return this.getContributors()
.then(contributors => this.contributors.pushObjects(contributors))