Skip to content

Commit

Permalink
zk-js: utils - fetchNullifierAccountInfo - fixes getBalance (#141)
Browse files Browse the repository at this point in the history
* zk-js: utils - fetchNullifierAccountInfo fixed nullifier pubkey derivation

* zk.js - fetchNullifierAccountInfo streamlined to buffer conversion
  • Loading branch information
ananas-block authored Jun 5, 2023
1 parent c0f0e77 commit 6f72f67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion light-zk.js/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6f72f67

Please sign in to comment.