From ab088a08553919e9be8a3f66b0ef0b9f7caed565 Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 25 Nov 2019 12:50:15 +0300 Subject: [PATCH] fetch gasPrice and rates for testnets for better testing during dev --- package.json | 2 +- src/index.js | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 7452534..3564874 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "relay", "version": "1.0.0", "description": "Relayer for Tornado mixer. https://tornado.cash", - "main": "index.js", + "main": "src/index.js", "scripts": { "start": "node src/index.js", "eslint": "npx eslint --ignore-path .gitignore .", diff --git a/src/index.js b/src/index.js index ab223c3..a316e07 100644 --- a/src/index.js +++ b/src/index.js @@ -34,12 +34,9 @@ app.get('/status', function (req, res) { app.post('/relay', relayController) app.listen(port || 8000) - -if (Number(netId) === 1) { - console.log('Gas price oracle started.') - fetcher.fetchGasPrice() - fetcher.fetchPrices() -} +console.log('Gas price oracle started.') +fetcher.fetchGasPrice() +fetcher.fetchPrices() console.log('Relayer started on port', port || 8000) console.log(`relayerAddress: ${web3.eth.defaultAccount}`)