Skip to content

Commit 43ca3c7

Browse files
committed
fix: stringify bigint erc20Value in useTransactionDetails
1 parent 2b5941f commit 43ca3c7

File tree

2 files changed

+15
-20
lines changed

2 files changed

+15
-20
lines changed

apps/playground-web/src/components/pay/transaction-button.tsx

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,20 @@ export function PayTransactionPreview() {
4040
});
4141

4242
return (
43-
<>
44-
<StyledConnectButton />
45-
<div className="h-10" />
46-
{account && (
47-
<TransactionWidget
48-
client={THIRDWEB_CLIENT}
49-
theme={theme === "light" ? "light" : "dark"}
50-
transaction={claimTo({
51-
contract: nftContract,
52-
quantity: 1n,
53-
tokenId: 2n,
54-
to: account?.address || "",
55-
})}
56-
title={nft?.metadata?.name}
57-
description={nft?.metadata?.description}
58-
image={nft?.metadata?.image}
59-
/>
60-
)}
61-
</>
43+
<TransactionWidget
44+
client={THIRDWEB_CLIENT}
45+
theme={theme === "light" ? "light" : "dark"}
46+
transaction={claimTo({
47+
contract: nftContract,
48+
quantity: 1n,
49+
tokenId: 2n,
50+
to: account?.address || "",
51+
})}
52+
amount={100n}
53+
title={nft?.metadata?.name}
54+
description={nft?.metadata?.description}
55+
image={nft?.metadata?.image}
56+
/>
6257
);
6358
}
6459

packages/thirdweb/src/react/core/hooks/useTransactionDetails.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export function useTransactionDetails({
5757
"transaction-details",
5858
transaction.to,
5959
transaction.chain.id,
60-
transaction.erc20Value,
60+
transaction.erc20Value?.toString(),
6161
],
6262
queryFn: async (): Promise<TransactionDetails> => {
6363
// Create contract instance for metadata fetching

0 commit comments

Comments
 (0)