mirror of
https://github.com/tornadocash/tornado-cli.git
synced 2024-11-25 03:11:29 +01:00
Remove duplicated definition
This commit is contained in:
parent
4bea523346
commit
940f3e8194
3
cli.js
3
cli.js
@ -948,6 +948,7 @@ async function init({ rpc, noteNetId, currency = 'dai', amount = '100', torPort,
|
|||||||
groth16 = await buildGroth16()
|
groth16 = await buildGroth16()
|
||||||
netId = await web3.eth.net.getId()
|
netId = await web3.eth.net.getId()
|
||||||
netName = getCurrentNetworkName()
|
netName = getCurrentNetworkName()
|
||||||
|
netSymbol = getCurrentNetworkSymbol()
|
||||||
if (noteNetId && Number(noteNetId) !== netId) {
|
if (noteNetId && Number(noteNetId) !== netId) {
|
||||||
throw new Error('This note is for a different network. Specify the --rpc option explicitly')
|
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) {
|
if (isLocalRPC) {
|
||||||
netSymbol = getCurrentNetworkSymbol()
|
|
||||||
tornadoAddress = currency === netSymbol.toLowerCase() ? contractJson.networks[netId].address : erc20tornadoJson.networks[netId].address
|
tornadoAddress = currency === netSymbol.toLowerCase() ? contractJson.networks[netId].address : erc20tornadoJson.networks[netId].address
|
||||||
tokenAddress = currency !== netSymbol.toLowerCase() ? erc20ContractJson.networks[netId].address : null
|
tokenAddress = currency !== netSymbol.toLowerCase() ? erc20ContractJson.networks[netId].address : null
|
||||||
deployedBlockNumber = 0
|
deployedBlockNumber = 0
|
||||||
senderAccount = (await web3.eth.getAccounts())[0]
|
senderAccount = (await web3.eth.getAccounts())[0]
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
netSymbol = getCurrentNetworkSymbol()
|
|
||||||
if (balanceCheck) {
|
if (balanceCheck) {
|
||||||
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]
|
||||||
|
Loading…
Reference in New Issue
Block a user