Skip to content

Commit

Permalink
chore: fix number overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
npty committed Mar 8, 2024
1 parent b97849a commit df71d80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/AxelarQueryAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ export class AxelarQueryAPI {
const ethTokenPrice = Number(ethereumToken.token_price.usd);
const ethToSrcTokenPriceRatio = ethTokenPrice / srcTokenPrice;

const actualL1ExecutionFee = Math.ceil(l1ExecutionFee.toNumber() * ethToSrcTokenPriceRatio);
const actualL1ExecutionFee = l1ExecutionFee.mul(ethToSrcTokenPriceRatio * 1000).div(1000);

l1ExecutionFee = BigNumber.from(actualL1ExecutionFee.toString());

Expand Down

0 comments on commit df71d80

Please sign in to comment.