Replaces the ipfsHash buffer with a B58 string #39

Merged
fsmanuel merged 1 commits from fix/ipfs-hash into master 2018-04-21 19:04:57 +00:00

View File

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