Skip to content

Commit

Permalink
trigger evm release
Browse files Browse the repository at this point in the history
  • Loading branch information
saadahmsiddiqui committed Aug 14, 2024
1 parent 4127acf commit d27e5e2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/evm/src/fungible.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,12 @@ function calculateAdjustedAmount(transfer: EvmFungibleAssetTransfer, fee: EvmFee
const maxFee = fee.maxFee!;
const percentage = fee.percentage!;
const userSpecifiedAmount = BigNumber.from(transfer.amount);

let amount = transfer.amount;
//calculate amount without fee (percentage)
// calculate amount
// without fee (percentage)
const feelessAmount = userSpecifiedAmount
.mul(constants.WeiPerEther)
.div(utils.parseEther(String(1 + percentage)));

const calculatedFee = userSpecifiedAmount.sub(feelessAmount);
amount = feelessAmount.toBigInt();

Expand Down

0 comments on commit d27e5e2

Please sign in to comment.