From 0c53f95a2d8aa6c0fa72db91f4c874f00320f9dc Mon Sep 17 00:00:00 2001 From: danisharora099 Date: Wed, 18 Jan 2023 15:46:14 +0530 Subject: [PATCH] fix: change endianness on idCommitment ref: waku-org/js-rln#37 --- examples/rln-js/index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/rln-js/index.html b/examples/rln-js/index.html index 49fda79..ec9206e 100644 --- a/examples/rln-js/index.html +++ b/examples/rln-js/index.html @@ -403,7 +403,9 @@ try { registerButton.disabled = true; - const pubkey = ethers.BigNumber.from(membershipKey.IDCommitment); + const idCommitment = membershipKey.IDCommitment; + const reversedArray = idCommitment.slice().reverse(); + const pubkey = ethers.utils.hexlify(reversedArray).toString(); const price = await rlnContract.MEMBERSHIP_DEPOSIT();