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);