Skip to content

Commit 48a14b5

Browse files
fix: solana options
1 parent ea41834 commit 48a14b5

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/connectkit/bundle-analysis.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

packages/connectkit/src/hooks/useTokenOptions.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import {
22
getChainName,
33
RozoPayToken,
4+
rozoSolana,
5+
solana,
46
WalletPaymentOption,
57
} from "@rozoai/intent-common";
68
import { useCallback, useEffect, useRef } from "react";
@@ -110,10 +112,14 @@ export function useTokenOptions(mode: "evm" | "solana" | "stellar" | "all"): {
110112

111113
if (shouldIncludeSolana) {
112114
// Filter Solana options by selectedChainId if provided
115+
// Note: solana (501) and rozoSolana (900) are both Solana chains
116+
// The API returns rozoSolana options, so we need to accept both chainIds
113117
const solanaOptionsRaw = solanaPaymentOptions.options ?? [];
114118
const filteredSolanaOptions = selectedChainId
115119
? solanaOptionsRaw.filter(
116-
(option) => option.balance.token.chainId === selectedChainId
120+
(option) =>
121+
option.balance.token.chainId === solana.chainId ||
122+
option.balance.token.chainId === rozoSolana.chainId
117123
)
118124
: solanaOptionsRaw;
119125

0 commit comments

Comments
 (0)