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:
2022-10-06 10:52:22 +02:00
parent 1e240b6539
commit 57934ae7a3
+2 -2
View File
@@ -119,6 +119,7 @@ export default Service.extend({
});
this.set('kredits', kredits);
console.log(kredits.Contributor.contract.address);
this.set('currentBlock', await kredits.provider.getBlockNumber());
if (this.currentUserAccounts && this.currentUserAccounts.length > 0) {
@@ -153,8 +154,7 @@ export default Service.extend({
}),
totalKreditsEarned: computed(function() {
return this.kredits.Contribution.functions.totalKreditsEarned(true)
.then(total => total.toNumber());
return this.kredits.Contribution.functions.totalKreditsEarned(true);
}),
kreditsByContributor: computed('contributionsUnconfirmed.@each.vetoed', 'contributors.[]', function() {