From 22827e3ddf719c45e7b5e0513ba2ba31581f4358 Mon Sep 17 00:00:00 2001 From: Eiman Date: Thu, 31 Jul 2025 16:00:43 -0500 Subject: [PATCH] fix: include gas parameters in mined transaction webhooks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously gasLimit and gasPrice fields were null in mined transaction webhooks because the resolver functions only checked for "sent" status. Since MinedTransaction inherits gas fields from SentTransaction, these values should be available for mined transactions as well. Updates the resolver functions to include "mined" status: - resolveGas() - returns transaction.gas for sent/mined transactions - resolveGasPrice() - returns transaction.gasPrice for sent/mined transactions - resolveMaxFeePerGas() - returns transaction.maxFeePerGas for sent/mined transactions - resolveMaxPriorityFeePerGas() - returns transaction.maxPriorityFeePerGas for sent/mined transactions 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/server/schemas/transaction/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/schemas/transaction/index.ts b/src/server/schemas/transaction/index.ts index ff82934f..a8dff4b7 100644 --- a/src/server/schemas/transaction/index.ts +++ b/src/server/schemas/transaction/index.ts @@ -277,28 +277,28 @@ export const toTransactionSchema = ( }; const resolveGas = (): string | null => { - if (transaction.status === "sent") { + if (transaction.status === "sent" || transaction.status === "mined") { return transaction.gas.toString(); } return transaction.overrides?.gas?.toString() ?? null; }; const resolveGasPrice = (): string | null => { - if (transaction.status === "sent") { + if (transaction.status === "sent" || transaction.status === "mined") { return transaction.gasPrice?.toString() ?? null; } return transaction.overrides?.gasPrice?.toString() ?? null; }; const resolveMaxFeePerGas = (): string | null => { - if (transaction.status === "sent") { + if (transaction.status === "sent" || transaction.status === "mined") { return transaction.maxFeePerGas?.toString() ?? null; } return transaction.overrides?.maxFeePerGas?.toString() ?? null; }; const resolveMaxPriorityFeePerGas = (): string | null => { - if (transaction.status === "sent") { + if (transaction.status === "sent" || transaction.status === "mined") { return transaction.maxPriorityFeePerGas?.toString() ?? null; } return transaction.overrides?.maxPriorityFeePerGas?.toString() ?? null;