refactor: use decodeCid

This commit is contained in:
Derrick Hammer 2023-09-02 23:12:27 -04:00
parent 01858e6579
commit ca5c983cbb
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 2 deletions

View File

@ -176,7 +176,7 @@ node.services.p2p.once("peerConnected", peerDefer.resolve);
await peerDefer.promise; await peerDefer.promise;
{ {
const cidBytes = base58btc.decode(cid); const cidBytes = decodeCid(cid);
const key = hdKey as HDKey; const key = hdKey as HDKey;
let sre: SignedRegistryEntry; let sre: SignedRegistryEntry;
@ -196,7 +196,7 @@ await peerDefer.promise;
CID_TYPES.RESOLVER, CID_TYPES.RESOLVER,
CID_HASH_TYPES.BLAKE3, CID_HASH_TYPES.BLAKE3,
]), ]),
cidBytes, cidBytes.hash,
); );
if (!equalBytes(ret?.data ?? new Uint8Array(), newEntry)) { if (!equalBytes(ret?.data ?? new Uint8Array(), newEntry)) {