From e9ff6d1488153daa6823cac5494888be6f39cb87 Mon Sep 17 00:00:00 2001 From: Ayanami Date: Wed, 26 Jan 2022 23:40:00 +0900 Subject: [PATCH] Define netSymbol in advance --- cli.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cli.js b/cli.js index bdebc83..8aebdf8 100755 --- a/cli.js +++ b/cli.js @@ -963,8 +963,8 @@ async function init({ rpc, noteNetId, currency = 'dai', amount = '100', torPort, senderAccount = (await web3.eth.getAccounts())[0] } else { try { + netSymbol = getCurrentNetworkSymbol() if (balanceCheck) { - netSymbol = getCurrentNetworkSymbol() currency = netSymbol.toLowerCase() amount = Object.keys(config.deployments[`netId${netId}`][currency].instanceAddress)[0] } @@ -981,7 +981,6 @@ async function init({ rpc, noteNetId, currency = 'dai', amount = '100', torPort, process.exit(1) } } - netSymbol = getCurrentNetworkSymbol() tornado = new web3.eth.Contract(contractJson, tornadoAddress) tornadoContract = new web3.eth.Contract(instanceJson, tornadoInstance) contractAddress = tornadoAddress