From 062b239f99aac307fcc8a3dde6519d3ab6ddaa21 Mon Sep 17 00:00:00 2001 From: XFT <anonymous@xft.eth> Date: Thu, 30 Mar 2023 12:58:42 -0400 Subject: [PATCH] padding fix --- test/XFTanon.mainnet.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/XFTanon.mainnet.test.js b/test/XFTanon.mainnet.test.js index 36b56ef..e458dd5 100644 --- a/test/XFTanon.mainnet.test.js +++ b/test/XFTanon.mainnet.test.js @@ -161,7 +161,7 @@ contract('XFTShifter', (accounts) => { throw new Error("The data provided couldn't be encrypted or decrypted, please check the inputs"); } } - encryptNote = async (deposit, key) => await xcrypt(`0x${deposit.nullifier.toString(16).padEnd(62, '0')}${deposit.secret.toString(16).padEnd(62, '0')}`, key); + encryptNote = async (deposit, key) => await xcrypt(`0x${deposit.nullifier.toString(16).padStart(62, '0')}${deposit.secret.toString(16).padStart(62, '0')}`, key); xft = await XFT.at(allShifters['XFT'].contract) token = await Token.at(allShifters['anonUSD500'].contract) tokenETH = await Token.at(allShifters['anonETH1'].contract) -- GitLab