Skip to content

Commit 1ba738a

Browse files
authored
fix: Handle undefined nonce in transaction status (#765)
1 parent ee9c4ee commit 1ba738a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/server/schemas/transaction/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,10 @@ export const toTransactionSchema = (
292292
toAddress: transaction.to ?? null,
293293
data: transaction.data ?? null,
294294
value: transaction.value.toString(),
295-
nonce: "nonce" in transaction ? transaction.nonce : null,
295+
nonce:
296+
"nonce" in transaction && transaction.nonce !== undefined
297+
? transaction.nonce
298+
: null,
296299
deployedContractAddress: transaction.deployedContractAddress ?? null,
297300
deployedContractType: transaction.deployedContractType ?? null,
298301
functionName: transaction.functionName ?? null,

0 commit comments

Comments
 (0)