Skip to content

Commit

Permalink
pass sourceAsset decimals to evm gasFee
Browse files Browse the repository at this point in the history
  • Loading branch information
toddkao committed Sep 20, 2024
1 parent 3f0d51c commit a3467fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/widget-v2/src/pages/SwapPage/useSetMaxAmount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const useGasFeeTokenAmount = () => {

switch (chainType) {
case "evm":
return Number(convertHumanReadableAmountToCryptoAmount(ETH_GAS_FEE));
return Number(convertHumanReadableAmountToCryptoAmount(ETH_GAS_FEE, sourceDetails.asset?.decimals));
case "cosmos":
if (!feeAsset?.gasPrice?.average || feeAsset.denom !== sourceAsset?.denom) return 0;
return Number(feeAsset.gasPrice.average) * (COSMOS_GAS_FEE);
Expand Down

0 comments on commit a3467fe

Please sign in to comment.