Skip to content

Commit e48eb99

Browse files
committed
fix: chain group picker
1 parent c8fb27a commit e48eb99

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

packages/rainbowkit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stakekit/rainbowkit",
3-
"version": "2.2.7",
3+
"version": "2.2.8",
44
"description": "The best way to connect a wallet",
55
"files": ["dist", "styles.css", "wallets"],
66
"type": "module",

packages/rainbowkit/src/components/ConnectOptions/DesktopOptions.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,10 @@ export function DesktopOptions({ onClose }: { onClose: () => void }) {
240240
);
241241
const [walletStep, setWalletStep] = useState<WalletStep>(initialWalletStep);
242242

243+
if (walletStep === WalletStep.SelectChainGroup && selectedChainGroupId) {
244+
setSelectedChainGroupId(undefined);
245+
}
246+
243247
let walletContent = null;
244248
let headerLabel = null;
245249
let headerBackButtonLink: WalletStep | null = null;

packages/rainbowkit/src/components/ConnectOptions/MobileOptions.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,13 @@ export function MobileOptions({ onClose }: { onClose: () => void }) {
248248
: MobileWalletStep.Connect,
249249
);
250250

251+
if (
252+
walletStep === MobileWalletStep.SelectChainGroup &&
253+
selectedChainGroupId
254+
) {
255+
setSelectedChainGroupId(undefined);
256+
}
257+
251258
const { i18n } = useContext(I18nContext);
252259

253260
const ios = isIOS();

0 commit comments

Comments
 (0)