calculate fee percent

This commit is contained in:
Alexey 2022-02-25 20:15:56 +01:00
parent 767c87b4d2
commit 5be9b8ad72
No known key found for this signature in database
GPG Key ID: C77958099D784E76
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "pool-relayer",
"version": "0.0.2",
"version": "0.0.3",
"description": "Relayer for Tornado.cash Nova privacy solution. https://tornado.cash",
"author": "tornado.cash",
"license": "MIT",

View File

@ -124,7 +124,8 @@ export class TransactionProcessor extends BaseProcessor<Transaction> {
if (amount.isNegative()) {
const oneEther = getToIntegerMultiplier();
return amount.mul(toWei(serviceFee.withdrawal)).div(oneEther);
const share = Number(serviceFee.withdrawal) / 100;
return amount.mul(toWei(share.toString())).div(oneEther);
}
return serviceFee.transfer;