From 108ab86fcc82cd22d394939e00ec8047eaaab901 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 4 Sep 2023 03:51:39 -0400 Subject: [PATCH] fix: use hashType not type --- src/cid.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cid.ts b/src/cid.ts index 574e1e6..0df8c91 100644 --- a/src/cid.ts +++ b/src/cid.ts @@ -39,7 +39,7 @@ export function encodeCid( if (typeof hash !== "string" && !(hash instanceof Uint8Array)) { size = hash.size; type = type ?? hash.type; - hashType = hashType ?? hash.type; + hashType = hashType ?? hash.hashType; hash = hash.hash; } try {