Fix for new Contribution#totalKreditsEarned type
totalKreditsEarned is no longer a Big number but now already a number. I think this is due to the change of the denomination.
This commit is contained in:
@@ -119,6 +119,7 @@ export default Service.extend({
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.set('kredits', kredits);
|
this.set('kredits', kredits);
|
||||||
|
console.log(kredits.Contributor.contract.address);
|
||||||
this.set('currentBlock', await kredits.provider.getBlockNumber());
|
this.set('currentBlock', await kredits.provider.getBlockNumber());
|
||||||
|
|
||||||
if (this.currentUserAccounts && this.currentUserAccounts.length > 0) {
|
if (this.currentUserAccounts && this.currentUserAccounts.length > 0) {
|
||||||
@@ -153,8 +154,7 @@ export default Service.extend({
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
totalKreditsEarned: computed(function() {
|
totalKreditsEarned: computed(function() {
|
||||||
return this.kredits.Contribution.functions.totalKreditsEarned(true)
|
return this.kredits.Contribution.functions.totalKreditsEarned(true);
|
||||||
.then(total => total.toNumber());
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
kreditsByContributor: computed('contributionsUnconfirmed.@each.vetoed', 'contributors.[]', function() {
|
kreditsByContributor: computed('contributionsUnconfirmed.@each.vetoed', 'contributors.[]', function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user