Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Commit

Permalink
fix: encode with multibase
Browse files Browse the repository at this point in the history
  • Loading branch information
hugomrdias authored and vmx committed Apr 21, 2020
1 parent 886b06d commit f709ec9
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions test/dag-node-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const BlockService = require('ipfs-block-service')
const Block = require('ipld-block')
const CID = require('cids')
const multibase = require('multibase')
const bs58 = require('bs58')
const loadFixture = require('aegir/fixtures')

const testBlockNamedLinks = loadFixture('test/fixtures/test-block-named-links')
Expand Down Expand Up @@ -473,18 +472,15 @@ module.exports = (repo) => {
Hash: 'QmP7SrR76KHK9A916RbHG1ufy2TzNABZgiE23PjZDMzZXy',
Size: 262158
}
console.log(multibase.decode('z' + l1.Hash), bs58.decode(l1.Hash))
const link1 = new DAGLink(
l1.Name,
l1.Tsize,
multibase.decode('z' + l1.Hash)
// Buffer.from(bs58.decode(l1.Hash))
)
const link2 = new DAGLink(
l2.Name,
l2.Tsize,
multibase.decode('z' + l2.Hash)
// Buffer.from(bs58.decode(l2.Hash))
)

const node = new DAGNode(Buffer.from('hiya'), [link1, link2])
Expand Down

0 comments on commit f709ec9

Please sign in to comment.