From e92046a7ec257a1bae4bf1da27d4c8b3b4ecb33d Mon Sep 17 00:00:00 2001 From: Theo Date: Wed, 21 Jun 2023 16:37:41 -0700 Subject: [PATCH] Fix compliance, don't throw error if note isn't spent --- cli.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cli.js b/cli.js index 6608f44..2471407 100755 --- a/cli.js +++ b/cli.js @@ -1324,6 +1324,8 @@ async function loadWithdrawalData({ amount, currency, deposit }) { return event.nullifierHash === deposit.nullifierHex; })[0]; + if (!withdrawEvent) return null; + const fee = withdrawEvent.fee; const decimals = config.deployments[`netId${netId}`]['tokens'][currency].decimals; const withdrawalAmount = toBN(fromDecimals({ amount, decimals })).sub(toBN(fee)); @@ -1417,8 +1419,8 @@ async function init({ rpc, noteNetId, currency = 'dai', amount = '100', balanceC if (!isIpPrivate && !rpc.includes('localhost') && !privateRpc) { try { - const htmlIPInfo = await axios.get("https://check.torproject.org", ipOptions); - const ip = htmlIPInfo.data.split("Your IP address appears to be: ").pop().split("').pop().split('