fetch gasPrice and rates for testnets for better testing during dev

This commit is contained in:
Alexey 2019-11-25 12:50:15 +03:00
parent db6a47f4fb
commit ab088a0855
2 changed files with 4 additions and 7 deletions

View File

@ -2,7 +2,7 @@
"name": "relay", "name": "relay",
"version": "1.0.0", "version": "1.0.0",
"description": "Relayer for Tornado mixer. https://tornado.cash", "description": "Relayer for Tornado mixer. https://tornado.cash",
"main": "index.js", "main": "src/index.js",
"scripts": { "scripts": {
"start": "node src/index.js", "start": "node src/index.js",
"eslint": "npx eslint --ignore-path .gitignore .", "eslint": "npx eslint --ignore-path .gitignore .",

View File

@ -34,12 +34,9 @@ app.get('/status', function (req, res) {
app.post('/relay', relayController) app.post('/relay', relayController)
app.listen(port || 8000) app.listen(port || 8000)
if (Number(netId) === 1) {
console.log('Gas price oracle started.') console.log('Gas price oracle started.')
fetcher.fetchGasPrice() fetcher.fetchGasPrice()
fetcher.fetchPrices() fetcher.fetchPrices()
}
console.log('Relayer started on port', port || 8000) console.log('Relayer started on port', port || 8000)
console.log(`relayerAddress: ${web3.eth.defaultAccount}`) console.log(`relayerAddress: ${web3.eth.defaultAccount}`)