mirror of
https://github.com/tornadocash/tornado-cli.git
synced 2024-11-21 17:27:07 +01:00
Make remote IP detection optional
Some may could not access to tornado.cash without VPN
This commit is contained in:
parent
1f26d8cc2f
commit
ba31dfa32d
10
cli.js
10
cli.js
@ -945,9 +945,13 @@ async function init({ rpc, noteNetId, currency = 'dai', amount = '100', torPort,
|
||||
console.log("Connecting to remote node")
|
||||
web3 = new Web3(rpc, null, { transactionConfirmationBlocks: 1 })
|
||||
}
|
||||
const fetchRemoteIP = await axios.get('https://ip.tornado.cash', ipOptions)
|
||||
const { country, ip } = fetchRemoteIP.data
|
||||
console.log('Your remote IP address is',ip,'from',country+'.');
|
||||
try {
|
||||
const fetchRemoteIP = await axios.get('https://ip.tornado.cash', ipOptions)
|
||||
const { country, ip } = fetchRemoteIP.data
|
||||
console.log('Your remote IP address is',ip,'from',country+'.');
|
||||
} catch (error) {
|
||||
console.error('Could not fetch remote IP from ip.tornado.cash, use VPN if the problem repeats.');
|
||||
}
|
||||
contractJson = require('./build/contracts/TornadoProxy.abi.json')
|
||||
instanceJson = require('./build/contracts/Instance.abi.json')
|
||||
circuit = require('./build/circuits/tornado.json')
|
||||
|
Loading…
Reference in New Issue
Block a user