Skip to content

Commit 3873392

Browse files
Oba-Oneclaude
andcommitted
fix(client): use as const for tuple inference in useReadContract args
The safeBigInt IIFE returned bigint[] which isn't assignable to wagmi's expected readonly tuple type. Adding as const narrows the array literal to the correct tuple shape. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e85470f commit 3873392

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/components/jar/NFTGatedWithdrawalSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export const NFTGatedWithdrawalSection: React.FC<
159159
address: (activeNFT?.contractAddress as `0x${string}`) || undefined,
160160
abi: ERC721_ABI,
161161
functionName: "ownerOf",
162-
args: activeNFT?.tokenId ? (() => { const id = safeBigInt(activeNFT.tokenId); return id !== undefined ? [id] : undefined; })() : undefined,
162+
args: activeNFT?.tokenId ? (() => { const id = safeBigInt(activeNFT.tokenId); return id !== undefined ? [id] as const : undefined; })() : undefined,
163163
query: {
164164
enabled: !!(
165165
activeNFT?.contractAddress &&
@@ -181,7 +181,7 @@ export const NFTGatedWithdrawalSection: React.FC<
181181
functionName: "balanceOf",
182182
args:
183183
userAddress && activeNFT?.tokenId
184-
? (() => { const id = safeBigInt(activeNFT.tokenId); return id !== undefined ? [userAddress, id] : undefined; })()
184+
? (() => { const id = safeBigInt(activeNFT.tokenId); return id !== undefined ? [userAddress, id] as const : undefined; })()
185185
: undefined,
186186
query: {
187187
enabled: !!(

0 commit comments

Comments
 (0)