Compare commits
2 Commits
5ad9b5ef05
...
8f1bb32701
Author | SHA1 | Date | |
---|---|---|---|
8f1bb32701 | |||
0b4e6e37d9 |
12
cli.js
12
cli.js
@ -17,7 +17,7 @@ const { toWei, fromWei, toBN, BN } = require('web3-utils');
|
|||||||
const BigNumber = require('bignumber.js');
|
const BigNumber = require('bignumber.js');
|
||||||
const config = require('./config');
|
const config = require('./config');
|
||||||
const program = require('commander');
|
const program = require('commander');
|
||||||
const { TornadoFeeOracleV4, TornadoFeeOracleV5, TokenPriceOracle } = require('@tornado/tornado-oracles');
|
const { TornadoFeeOracleV4, TornadoFeeOracleV5 } = require('@tornado/tornado-oracles');
|
||||||
const { SocksProxyAgent } = require('socks-proxy-agent');
|
const { SocksProxyAgent } = require('socks-proxy-agent');
|
||||||
const is_ip_private = require('private-ip');
|
const is_ip_private = require('private-ip');
|
||||||
const readline = require('readline');
|
const readline = require('readline');
|
||||||
@ -486,7 +486,15 @@ async function withdraw({ deposit, currency, amount, recipient, relayerURL, refu
|
|||||||
headers: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0' }
|
headers: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0' }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const relayerStatus = await axios.get(relayerURL + '/status', options);
|
|
||||||
|
let relayerStatus;
|
||||||
|
try {
|
||||||
|
relayerURL = new URL(relayerURL).origin;
|
||||||
|
relayerStatus = await axios.get(relayerURL + '/status', options);
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
throw new Error('Cannot get relayer status');
|
||||||
|
}
|
||||||
|
|
||||||
const { rewardAccount, netId, ethPrices, tornadoServiceFee } = relayerStatus.data;
|
const { rewardAccount, netId, ethPrices, tornadoServiceFee } = relayerStatus.data;
|
||||||
assert(netId === (await web3.eth.net.getId()) || netId === '*', 'This relay is for different network');
|
assert(netId === (await web3.eth.net.getId()) || netId === '*', 'This relay is for different network');
|
||||||
|
728
package-lock.json
generated
728
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -11,12 +11,12 @@
|
|||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ethersproject/transactions": "^5.7.0",
|
"@ethersproject/transactions": "^5.7.0",
|
||||||
"@tornado/circomlib": "0.0.20-p2",
|
"@tornado/circomlib": "0.0.21",
|
||||||
"@tornado/fixed-merkle-tree": "0.6.1-p1",
|
"@tornado/fixed-merkle-tree": "0.6.1",
|
||||||
"@tornado/snarkjs": "0.1.20-p2",
|
"@tornado/snarkjs": "0.1.20",
|
||||||
"@tornado/tornado-oracles": "^3.3.0",
|
"@tornado/tornado-oracles": "^3.3.0",
|
||||||
"@tornado/web3-providers-http": "1.6.5-p1",
|
"@tornado/web3-providers-http": "1.6.5-p1",
|
||||||
"@tornado/websnark": "0.0.4-p1",
|
"@tornado/websnark": "0.0.4",
|
||||||
"axios": "^0.19.2",
|
"axios": "^0.19.2",
|
||||||
"bignumber.js": "^9.0.0",
|
"bignumber.js": "^9.0.0",
|
||||||
"circom": "0.0.35",
|
"circom": "0.0.35",
|
||||||
|
Loading…
Reference in New Issue
Block a user