Skip to content

Commit 4b2c2b0

Browse files
committed
fix: use maybeInt for nonce parsing in signTransaction
1 parent 5c3e4b6 commit 4b2c2b0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/server/routes/backend-wallet/sign-transaction.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { getAccount } from "../../../shared/utils/account";
55
import {
66
getChecksumAddress,
77
maybeBigInt,
8+
maybeInt,
89
} from "../../../shared/utils/primitive-types";
910
import { thirdwebClient } from "../../../shared/utils/sdk";
1011
import { createCustomError } from "../../middleware/error";
@@ -82,7 +83,7 @@ export async function signTransaction(fastify: FastifyInstance) {
8283
...transaction,
8384
data: transaction.data as Hex | undefined,
8485
client: thirdwebClient,
85-
nonce: nonce ? Number.parseInt(nonce) : undefined,
86+
nonce: maybeInt(nonce),
8687
chain,
8788
value: maybeBigInt(transaction.value),
8889
gas: maybeBigInt(transaction.gasLimit),

0 commit comments

Comments
 (0)