fix: set correct bigint tree leaves

This commit is contained in:
cedoor
2022-02-14 13:51:40 +01:00
parent 515591a7f2
commit 6acdd40533

View File

@@ -66,7 +66,7 @@ export function generateMerkleProof(
): MerkleProof {
const tree = generateMerkleTree(depth, zeroValue, arity, leaves)
const leafIndex = leaves.indexOf(BigInt(leaf))
const leafIndex = tree.leaves.indexOf(BigInt(leaf))
if (leafIndex === -1) {
throw new Error("The leaf does not exists")