From 57934ae7a34e2bb26209de6f409986848873750f Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Thu, 6 Oct 2022 10:52:22 +0200 Subject: [PATCH] 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. --- app/services/kredits.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/kredits.js b/app/services/kredits.js index cc55354..06568ac 100644 --- a/app/services/kredits.js +++ b/app/services/kredits.js @@ -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() {