Skip to content

Commit

Permalink
add missing mul to eip1559
Browse files Browse the repository at this point in the history
  • Loading branch information
walmat committed Sep 20, 2024
1 parent 95abd8a commit 0604af3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/__swaps__/screens/Swap/hooks/useEstimatedGasFee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function calculateGasFee(gasSettings: GasSettings, gasLimit: string) {
return null;
}

return add(gasSettings.maxBaseFee, gasSettings.maxPriorityFee);
return multiply(gasLimit, add(gasSettings.maxBaseFee, gasSettings.maxPriorityFee));
}

if (isFeeNaN(gasSettings.gasPrice)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export function calculateGasFeeWorklet(gasSettings: GasSettings, gasLimit: strin
return null;
}

return sumWorklet(gasSettings.maxBaseFee || '0', gasSettings.maxPriorityFee || '0');
return mulWorklet(gasLimit, sumWorklet(gasSettings.maxBaseFee || '0', gasSettings.maxPriorityFee || '0'));
}

if (isFeeNaNWorklet(gasSettings.gasPrice)) {
Expand Down

0 comments on commit 0604af3

Please sign in to comment.