From 0b77c1a77f609502082810f13fa178d384d4b389 Mon Sep 17 00:00:00 2001 From: Nick Frostbutter <75431177+nickfrosty@users.noreply.github.com> Date: Wed, 3 May 2023 12:31:41 -0400 Subject: [PATCH] fix: compression proof verification check (#504) --- .changeset/thirty-panthers-peel.md | 5 +++++ .../plugins/nftModule/operations/transferCompressedNft.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/thirty-panthers-peel.md diff --git a/.changeset/thirty-panthers-peel.md b/.changeset/thirty-panthers-peel.md new file mode 100644 index 000000000..33f3668ed --- /dev/null +++ b/.changeset/thirty-panthers-peel.md @@ -0,0 +1,5 @@ +--- +"@metaplex-foundation/js": patch +--- + +fix: compression proof verification check diff --git a/packages/js/src/plugins/nftModule/operations/transferCompressedNft.ts b/packages/js/src/plugins/nftModule/operations/transferCompressedNft.ts index 9010616a6..49bfff044 100644 --- a/packages/js/src/plugins/nftModule/operations/transferCompressedNft.ts +++ b/packages/js/src/plugins/nftModule/operations/transferCompressedNft.ts @@ -224,7 +224,7 @@ export const transferCompressedNftBuilder = ( // check if the provided assetProof path is valid for the provided root if ( - MerkleTree.verify(new PublicKey(compression.assetProof.root).toBuffer(), { + !MerkleTree.verify(new PublicKey(compression.assetProof.root).toBuffer(), { leafIndex: compression.data.leaf_id, leaf: new PublicKey(compression.assetProof.leaf).toBuffer(), root: new PublicKey(compression.assetProof.root).toBuffer(),