tokenbridge/monitor/getShortEventStats.js
Przemyslaw Rzad 40be5a5f8e
Extend line width to 120 (#174)
* Extend line width to 120

* Lint fixes
2019-08-01 15:10:22 +02:00

21 lines
597 B
JavaScript

require('dotenv').config()
const eventsInfo = require('./utils/events')
async function main(bridgeMode) {
const { foreignDeposits, homeDeposits, homeWithdrawals, foreignWithdrawals } = await eventsInfo(bridgeMode)
return {
depositsDiff: homeDeposits.length - foreignDeposits.length,
withdrawalDiff: homeWithdrawals.length - foreignWithdrawals.length,
home: {
deposits: homeDeposits.length,
withdrawals: homeWithdrawals.length
},
foreign: {
deposits: foreignDeposits.length,
withdrawals: foreignWithdrawals.length
}
}
}
module.exports = main