From 576313a7b03b5b34074e0d7941b3a5af01d4e2d6 Mon Sep 17 00:00:00 2001 From: Manuel Wiedenmann Date: Sun, 8 Apr 2018 01:25:59 +0200 Subject: [PATCH] Update according to suggestions --- app/services/kredits.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/services/kredits.js b/app/services/kredits.js index f92bedb..897d418 100644 --- a/app/services/kredits.js +++ b/app/services/kredits.js @@ -118,7 +118,7 @@ export default Service.extend({ getContributorById(id) { return this.get('contributorsContract') .then((contract) => contract.getContributorById(id)) - .then(this.replaceIpfsHash) + .then(this.reassembleIpfsHash) // Set basic data .then(({ account: address, balance, ipfsHash, isCore }) => { let isCurrentUser = this.get('currentUserAccounts').includes(address); @@ -157,9 +157,12 @@ export default Service.extend({ }); }, - replaceIpfsHash(data) { + reassembleIpfsHash(data) { let { ipfsHash: digest, hashFunction, hashSize } = data; data.ipfsHash = fromBytes32({ digest, hashFunction, hashSize }); + delete data.hashFunction; + delete data.hashSize; + return data; },