Skip to content

Commit 71eaf8f

Browse files
committed
[SDK] Fix: allow 0 values for gasPrice (#5841)
## Problem solved Allow `0` value for gasPrice, important for gasless chains Fixes TOOL-2865 <!-- start pr-codex --> --- ## PR-Codex overview This PR modifies the conditional check for `gasPrice` in the `fee-data.ts` file to ensure it specifically checks if `gasPrice` is of type `bigint` instead of just checking its truthiness. ### Detailed summary - Changed the condition from `if (gasPrice)` to `if (typeof gasPrice === "bigint")` in the `fee-data.ts` file. - This ensures that only values of type `bigint` are considered valid for `gasPrice`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 1556615 commit 71eaf8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/thirdweb/src/gas/fee-data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export async function getGasOverridesForTransaction(
6161
maxPriorityFeePerGas,
6262
};
6363
}
64-
if (gasPrice) {
64+
if (typeof gasPrice === "bigint") {
6565
return { gasPrice };
6666
}
6767

0 commit comments

Comments
 (0)