Skip to content

Commit

Permalink
Merge branch 'fix/lint' into tmp/20250117
Browse files Browse the repository at this point in the history
  • Loading branch information
heisenberg-2077 committed Jan 22, 2025
2 parents fc174d3 + 4d2bcd9 commit 984deb3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,10 @@ export async function calcGasLimit({
? gas.times(ratio).toFixed(0)
: gas.toFixed(0);
const blockGasRatio = SAFE_GAS_LIMIT_BUFFER[chain.id] || 1;
if (block && new BigNumber(block.gasLimit).times(blockGasRatio).lt(recommendGasLimit)) {
if (
block &&
new BigNumber(block.gasLimit).times(blockGasRatio).lt(recommendGasLimit)
) {
const buffer = SAFE_GAS_LIMIT_BUFFER[chain.id] || DEFAULT_GAS_LIMIT_BUFFER;
recommendGasLimit = new BigNumber(block.gasLimit).times(buffer).toFixed(0);
}
Expand Down

0 comments on commit 984deb3

Please sign in to comment.