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 {