mirror of
https://github.com/tornadocash/tornado-relayer.git
synced 2024-12-28 09:09:29 -05:00
relayerServiceFee as a number
This commit is contained in:
parent
7ca4715855
commit
fd458d4b19
@ -19,5 +19,5 @@ module.exports = {
|
||||
port: process.env.APP_PORT,
|
||||
//dai
|
||||
tokens: ['0x6b175474e89094c44da98b954eedeac495271d0f'],
|
||||
relayerServiceFee: process.env.RELAYER_FEE
|
||||
relayerServiceFee: Number(process.env.RELAYER_FEE)
|
||||
}
|
@ -58,7 +58,7 @@ function sleep(ms) {
|
||||
|
||||
function isEnoughFee({ gas, gasPrices, currency, amount, refund, ethPrices, fee }) {
|
||||
// TODO tokens can have less then 18 decimals
|
||||
const feePercent = toBN(toWei(amount)).mul(toBN(Number(relayerServiceFee) * 10)).div(toBN('1000'))
|
||||
const feePercent = toBN(toWei(amount)).mul(toBN(relayerServiceFee * 10)).div(toBN('1000'))
|
||||
const expense = toBN(toWei(gasPrices.fast.toString(), 'gwei')).mul(toBN(gas))
|
||||
let desiredFee
|
||||
switch (currency) {
|
||||
|
Loading…
Reference in New Issue
Block a user