Skip to content

Commit cf932d9

Browse files
committed
Make effective gas price optional
1 parent 30a1f4b commit cf932d9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/server/schemas/transaction/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,11 @@ export const toTransactionSchema = (
290290
retryCount: "retryCount" in transaction ? transaction.resendCount : 0,
291291
onChainTxStatus: resolveOnchainStatus(),
292292
effectiveGasPrice:
293-
"effectiveGasPrice" in transaction
293+
"effectiveGasPrice" in transaction && transaction.effectiveGasPrice
294294
? transaction.effectiveGasPrice.toString()
295295
: null,
296296
cumulativeGasUsed:
297-
"cumulativeGasUsed" in transaction
297+
"cumulativeGasUsed" in transaction && transaction.cumulativeGasUsed
298298
? transaction.cumulativeGasUsed.toString()
299299
: null,
300300

src/utils/transaction/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ export type MinedTransaction = (
7777
transactionType: TransactionType;
7878
onchainStatus: "success" | "reverted";
7979
gasUsed: bigint;
80-
effectiveGasPrice: bigint;
81-
cumulativeGasUsed: bigint;
80+
effectiveGasPrice?: bigint;
81+
cumulativeGasUsed?: bigint;
8282
};
8383

8484
// ErroredTransaction received an error before or while sending to RPC.

0 commit comments

Comments
 (0)