From ec800e6f0891aa9f2f8a5aacd0ed7de07a8ad960 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 19 Sep 2023 21:09:41 -0400 Subject: [PATCH] refactor: remove CID_HASH_TYPES check --- src/index.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index 1d3f593..8c26354 100644 --- a/src/index.ts +++ b/src/index.ts @@ -113,11 +113,7 @@ async function handleGetRegistryEntry(aq: ActiveQuery) { let { pubkey } = aq.callerInput; - pubkey = ensureBytes("registry entry ", pubkey, 32); - - if (pubkey[0] !== CID_HASH_TYPES.ED25519) { - pubkey = concatBytes(Uint8Array.from([CID_HASH_TYPES.ED25519]), pubkey); - } + pubkey = ensureBytes("registry entry", pubkey, 33); const ret = await node.services.registry.get(pubkey);