From 7c46cb49c5e9493ef1cb85a7f3991a1e2b20f86b Mon Sep 17 00:00:00 2001 From: Frederik Zwilling Date: Thu, 10 Oct 2024 20:22:49 +0200 Subject: [PATCH] snap: fixed using right merkle proof field --- packages/snap/package.json | 2 +- packages/snap/snap.manifest.json | 4 ++-- packages/snap/src/merkleProofSelection.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/snap/package.json b/packages/snap/package.json index 85db5a2a..919b9fa0 100644 --- a/packages/snap/package.json +++ b/packages/snap/package.json @@ -1,6 +1,6 @@ { "name": "@galactica-net/snap", - "version": "0.8.2", + "version": "0.8.3", "description": "A Metamask Snap for managing and using zkCertificates on the Galactica network.", "repository": { "type": "git", diff --git a/packages/snap/snap.manifest.json b/packages/snap/snap.manifest.json index d757a88b..f57650d5 100644 --- a/packages/snap/snap.manifest.json +++ b/packages/snap/snap.manifest.json @@ -1,5 +1,5 @@ { - "version": "0.8.2", + "version": "0.8.3", "description": "A Metamask Snap for managing and using zkCertificates on the Galactica network.", "proposedName": "Galactica ZK Vault", "repository": { @@ -7,7 +7,7 @@ "url": "https://github.com/Galactica-corp/galactica-snap.git" }, "source": { - "shasum": "r/8s5Pn+OzfE1+T92tgL9LjjJ5bYqRdP39zVdKq3yzA=", + "shasum": "cGKt6nNCMN6tJAyXdCH/6Pw2J9l2IvsY2uTjsIJiitk=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/snap/src/merkleProofSelection.ts b/packages/snap/src/merkleProofSelection.ts index d2bd71b4..1a904755 100644 --- a/packages/snap/src/merkleProofSelection.ts +++ b/packages/snap/src/merkleProofSelection.ts @@ -58,10 +58,10 @@ export async function getMerkleProof( if ((zkCert.merkleProof as any).leaf === undefined) { throw new GenericError({ name: 'MerkleProofUpdateFailed', - message: `Merkle proof is missing leaf`, + message: `Merkle proof is missing index`, }); } - zkCert.merkleProof.leafIndex = (zkCert.merkleProof as any).leaf; + zkCert.merkleProof.leafIndex = (zkCert.merkleProof as any).index; } if (