From 2b047fd1b0a822a2c4b5d7c4cad658528a0db5c7 Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Wed, 21 Aug 2024 17:45:23 +0400 Subject: [PATCH] Correct incorrect assumption around proofs --- packages/oz-merkle-tree/src/index.ts | 4 ++-- packages/oz-merkle-tree/test.csv | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/oz-merkle-tree/src/index.ts b/packages/oz-merkle-tree/src/index.ts index 10c7935..079c482 100644 --- a/packages/oz-merkle-tree/src/index.ts +++ b/packages/oz-merkle-tree/src/index.ts @@ -6,7 +6,7 @@ type Proof = { root: string; entries: { value: string[]; - proof: string; + proofs: string[]; }[]; }; @@ -25,7 +25,7 @@ const generateMerkleTree = (name: string, values: any[][], types: string[]) => { proofs.entries.push({ value: v as string[], - proof: proof[0], + proofs: proof, }); } diff --git a/packages/oz-merkle-tree/test.csv b/packages/oz-merkle-tree/test.csv index b93d57e..cacc10f 100644 --- a/packages/oz-merkle-tree/test.csv +++ b/packages/oz-merkle-tree/test.csv @@ -1,3 +1,5 @@ address,amount 0x0000000000000000000000000000000000000004,5000000000000000000 0x0000000000000000000000000000000000000020,0 +0x0000000000000000000000000000000000000021,50 +0x0000000000000000000000000000000000000022,60