From 940f3e81947f75a70151b03fd15b216225deb605 Mon Sep 17 00:00:00 2001 From: Ayanami Date: Thu, 27 Jan 2022 14:56:46 +0900 Subject: [PATCH] Remove duplicated definition --- cli.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cli.js b/cli.js index ac8a1a8..2ac2a21 100755 --- a/cli.js +++ b/cli.js @@ -948,6 +948,7 @@ async function init({ rpc, noteNetId, currency = 'dai', amount = '100', torPort, groth16 = await buildGroth16() netId = await web3.eth.net.getId() netName = getCurrentNetworkName() + netSymbol = getCurrentNetworkSymbol() if (noteNetId && Number(noteNetId) !== netId) { throw new Error('This note is for a different network. Specify the --rpc option explicitly') } @@ -956,14 +957,12 @@ async function init({ rpc, noteNetId, currency = 'dai', amount = '100', torPort, } if (isLocalRPC) { - netSymbol = getCurrentNetworkSymbol() tornadoAddress = currency === netSymbol.toLowerCase() ? contractJson.networks[netId].address : erc20tornadoJson.networks[netId].address tokenAddress = currency !== netSymbol.toLowerCase() ? erc20ContractJson.networks[netId].address : null deployedBlockNumber = 0 senderAccount = (await web3.eth.getAccounts())[0] } else { try { - netSymbol = getCurrentNetworkSymbol() if (balanceCheck) { currency = netSymbol.toLowerCase() amount = Object.keys(config.deployments[`netId${netId}`][currency].instanceAddress)[0]