mirror of
https://github.com/tornadocash/tornado-relayer.git
synced 2024-10-01 08:25:37 -04:00
add latest block
This commit is contained in:
parent
1ac1b6c5ce
commit
3d718bb9a3
10
src/index.js
10
src/index.js
@ -37,8 +37,15 @@ app.get('/', function (req, res) {
|
||||
res.send('This is <a href=https://tornado.cash>tornado.cash</a> Relayer service. Check the <a href=/status>/status</a> for settings')
|
||||
})
|
||||
|
||||
|
||||
app.get('/status', async function (req, res) {
|
||||
let nonce = await redisClient.get('nonce')
|
||||
let latestBlock = null
|
||||
try {
|
||||
latestBlock = await web3.eth.getBlockNumber()
|
||||
} catch(e) {
|
||||
console.error('Problem with RPC', e)
|
||||
}
|
||||
const { ethPrices } = fetcher
|
||||
res.json({
|
||||
relayerAddress: web3.eth.defaultAccount,
|
||||
@ -48,7 +55,8 @@ app.get('/status', async function (req, res) {
|
||||
ethPrices,
|
||||
relayerServiceFee,
|
||||
nonce,
|
||||
version
|
||||
version,
|
||||
latestBlock
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user