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