Skip to content

Commit 53b6d1b

Browse files
authored
bal override path (#8516)
1 parent 9856ee4 commit 53b6d1b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/thirdweb/src/wallets/utils/getWalletBalance.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,15 @@ export type GetWalletBalanceResult = GetBalanceResult;
4343
export async function getWalletBalance(
4444
options: GetWalletBalanceOptions,
4545
): Promise<GetBalanceResult> {
46-
const { address, client, chain, tokenAddress } = options;
46+
const { address, client, chain } = options;
47+
48+
// Scipper chain (42429) uses a wrapped native token for balance queries
49+
const tokenAddress =
50+
options.tokenAddress ||
51+
(chain.id === 42429
52+
? "0x20c0000000000000000000000000000000000000"
53+
: undefined);
54+
4755
// erc20 case
4856
if (
4957
tokenAddress &&

0 commit comments

Comments
 (0)