diff --git a/light-zk.js/src/utils.ts b/light-zk.js/src/utils.ts index dfe4d9ff71..bc9eb315e1 100644 --- a/light-zk.js/src/utils.ts +++ b/light-zk.js/src/utils.ts @@ -182,7 +182,7 @@ export const fetchNullifierAccountInfo = async ( ) => { const nullifierPubkey = PublicKey.findProgramAddressSync( [ - Buffer.from(new anchor.BN(nullifier.toString()).toArray()), + new anchor.BN(nullifier.toString()).toBuffer("be", 32), anchor.utils.bytes.utf8.encode("nf"), ], merkleTreeProgramId,