mirror of
https://github.com/tornadocash/tornado-relayer.git
synced 2025-08-15 17:40:18 -04:00
make normal relayer's fee
This commit is contained in:
parent
1edc8ff69c
commit
ffb9043b60
3 changed files with 4 additions and 4 deletions
|
@ -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(relayerServiceFee)).div(toBN('1000'))
|
||||
const feePercent = toBN(toWei(amount)).mul(toBN(Number(relayerServiceFee) * 10)).div(toBN('1000'))
|
||||
const expense = toBN(toWei(gasPrices.fast.toString(), 'gwei')).mul(toBN(gas))
|
||||
let desiredFee
|
||||
switch (currency) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue