Skip to content

Commit 0c655ee

Browse files
fix: Override lower bound gas when gasLimit is defined
1 parent 62b0ac9 commit 0c655ee

File tree

1 file changed

+5
-0
lines changed
  • packages/transaction-controller/src/utils

1 file changed

+5
-0
lines changed

packages/transaction-controller/src/utils/gas.ts

+5
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ async function getGas(
141141
return [txMeta.txParams.gas, undefined, txMeta.txParams.gas];
142142
}
143143

144+
if (txMeta.txParams.gasLimit) {
145+
log('Using value from request', txMeta.txParams.gasLimit);
146+
return [txMeta.txParams.gasLimit, undefined, txMeta.txParams.gasLimit];
147+
}
148+
144149
if (await requiresFixedGas(request)) {
145150
log('Using fixed value', FIXED_GAS);
146151
return [FIXED_GAS, undefined, FIXED_GAS];

0 commit comments

Comments
 (0)