Skip to content

Commit

Permalink
fix: download option, back button for download flow (#2170)
Browse files Browse the repository at this point in the history
* fix: download option, back button for download flow

* chore: changeset

* fix: backward flow from connect->get
  • Loading branch information
DanielSinclair authored Sep 9, 2024
1 parent 2dda603 commit 8d9a4e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/silly-mugs-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rainbow-me/rainbowkit": patch
---

Fixed an issue where some options in the "Get Wallet" flow would appear as a blank page, or lack a back button to return to the Connect flow.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export function DesktopOptions({ onClose }: { onClose: () => void }) {
const wallets = useWalletConnectors(mergeEIP6963WithRkConnectors)
.filter((wallet) => wallet.ready || !!wallet.extensionDownloadUrl)
.sort((a, b) => a.groupIndex - b.groupIndex);
const unfilteredWallets = useWalletConnectors();

const groupedWallets = groupBy(wallets, (wallet) => wallet.groupName);

Expand Down Expand Up @@ -172,8 +173,7 @@ export function DesktopOptions({ onClose }: { onClose: () => void }) {
};

const getWalletDownload = (id: string) => {
setSelectedOptionId(id);
const sWallet = wallets.find((w) => id === w.id);
const sWallet = unfilteredWallets.find((w) => id === w.id);
const isMobile = sWallet?.downloadUrls?.qrCode;
const isDesktop = !!sWallet?.desktopDownloadUrl;
const isExtension = !!sWallet?.extensionDownloadUrl;
Expand Down Expand Up @@ -300,7 +300,7 @@ export function DesktopOptions({ onClose }: { onClose: () => void }) {
? WalletStep.Connect
: compactModeEnabled
? WalletStep.None
: null;
: initialWalletStep;
break;
case WalletStep.Download:
walletContent = selectedWallet && (
Expand Down

0 comments on commit 8d9a4e6

Please sign in to comment.