From ca5c983cbb62a844279c27c1071dba6a1daf5d8c Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 2 Sep 2023 23:12:27 -0400 Subject: [PATCH] refactor: use decodeCid --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 9a81369..1948d39 100644 --- a/src/index.ts +++ b/src/index.ts @@ -176,7 +176,7 @@ node.services.p2p.once("peerConnected", peerDefer.resolve); await peerDefer.promise; { - const cidBytes = base58btc.decode(cid); + const cidBytes = decodeCid(cid); const key = hdKey as HDKey; let sre: SignedRegistryEntry; @@ -196,7 +196,7 @@ await peerDefer.promise; CID_TYPES.RESOLVER, CID_HASH_TYPES.BLAKE3, ]), - cidBytes, + cidBytes.hash, ); if (!equalBytes(ret?.data ?? new Uint8Array(), newEntry)) {