Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 6720722

Browse files
committed
fixup! feat!: update interface-ipfs-core DAG API to match [email protected]
1 parent 8392690 commit 6720722

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/interface-ipfs-core/src/dag/get.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export function testGet (factory, options) {
7373
Data: uint8ArrayFromString('I am inside a Protobuf'),
7474
Links: []
7575
}
76-
cidPb = CID.createV0(await sha256.digest(dagPB.encode(nodePb)))
76+
cidPb = CID.createV1(dagPB.code, await sha256.digest(dagPB.encode(nodePb)))
7777
nodeCbor = {
7878
someData: 'I am inside a Cbor object',
7979
pb: cidPb
@@ -122,7 +122,7 @@ export function testGet (factory, options) {
122122

123123
const node = result.value
124124

125-
const cid = CID.createV0(await sha256.digest(dagPB.encode(node)))
125+
const cid = CID.createV1(dagPB.code, await sha256.digest(dagPB.encode(node)))
126126
expect(cid.equals(cidPb)).to.be.true()
127127
})
128128

packages/interface-ipfs-core/src/object/stat.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export function testStat (factory, options) {
4141
const cid = await ipfs.object.put(testObj)
4242
const stats = await ipfs.object.stat(cid)
4343
const expected = {
44-
Hash: CID.parse('QmNggDXca24S6cMPEYHZjeuc4QRmofkRrAEqVL3Ms2sdJZ'),
44+
Hash: CID.parse('QmNggDXca24S6cMPEYHZjeuc4QRmofkRrAEqVL3Ms2sdJZ').toV1(),
4545
NumLinks: 0,
4646
BlockSize: 17,
4747
LinksSize: 2,

0 commit comments

Comments
 (0)