mirror of
https://github.com/tornadocash/tornado-cli.git
synced 2024-12-22 17:23:41 +01:00
Define netSymbol in advance
This commit is contained in:
parent
15fe31445a
commit
e9ff6d1488
3
cli.js
3
cli.js
@ -963,8 +963,8 @@ async function init({ rpc, noteNetId, currency = 'dai', amount = '100', torPort,
|
|||||||
senderAccount = (await web3.eth.getAccounts())[0]
|
senderAccount = (await web3.eth.getAccounts())[0]
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
|
netSymbol = getCurrentNetworkSymbol()
|
||||||
if (balanceCheck) {
|
if (balanceCheck) {
|
||||||
netSymbol = getCurrentNetworkSymbol()
|
|
||||||
currency = netSymbol.toLowerCase()
|
currency = netSymbol.toLowerCase()
|
||||||
amount = Object.keys(config.deployments[`netId${netId}`][currency].instanceAddress)[0]
|
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)
|
process.exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
netSymbol = getCurrentNetworkSymbol()
|
|
||||||
tornado = new web3.eth.Contract(contractJson, tornadoAddress)
|
tornado = new web3.eth.Contract(contractJson, tornadoAddress)
|
||||||
tornadoContract = new web3.eth.Contract(instanceJson, tornadoInstance)
|
tornadoContract = new web3.eth.Contract(instanceJson, tornadoInstance)
|
||||||
contractAddress = tornadoAddress
|
contractAddress = tornadoAddress
|
||||||
|
Loading…
Reference in New Issue
Block a user