From 471c705e6416edac56c8e0cb7754538eb2b88c8b Mon Sep 17 00:00:00 2001 From: Manuel Wiedenmann Date: Sat, 21 Apr 2018 20:59:59 +0200 Subject: [PATCH] Replaces the ipfsHash buffer with a B58 string --- lib/utils/ipfs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utils/ipfs.js b/lib/utils/ipfs.js index e0aecb6..3c53ce0 100644 --- a/lib/utils/ipfs.js +++ b/lib/utils/ipfs.js @@ -17,9 +17,9 @@ class IPFS { return data; } // merge ipfsHash (encoded from hashDigest, hashSize, hashFunction) - data.ipfsHash = this.encodeHash(data); + data.ipfsHash = multihashes.toB58String(this.encodeHash(data)); - return this.cat(data) + return this.cat(data.ipfsHash) .then(deserialize) .then((attributes) => { return Object.assign({}, data, attributes); -- 2.25.1