diff --git a/components/react/modal.tsx b/components/react/modal.tsx
index f245a66f..37d2d9d9 100644
--- a/components/react/modal.tsx
+++ b/components/react/modal.tsx
@@ -39,6 +39,7 @@ export const TailwindModal: React.FC<
const [currentView, setCurrentView] = useState(ModalView.WalletList);
const [qrWallet, setQRWallet] = useState();
+ const [selectedWallet, setSelectedWallet] = useState();
const current = walletRepo?.current;
const currentWalletData = current?.walletInfo;
@@ -82,6 +83,11 @@ export const TailwindModal: React.FC<
// 1ms timeout prevents _render from determining the view to show first
setTimeout(() => {
const wallet = walletRepo?.getWallet(name);
+
+ if (wallet?.isWalletNotExist) {
+ setCurrentView(ModalView.NotExist);
+ setSelectedWallet(wallet);
+ }
if (wallet?.walletInfo.mode === 'wallet-connect') {
setCurrentView(ModalView.QRCode);
setQRWallet(wallet);
@@ -162,11 +168,11 @@ export const TailwindModal: React.FC<
onClose={onCloseModal}
onReturn={() => setCurrentView(ModalView.WalletList)}
onInstall={() => {
- const link = current?.downloadInfo?.link;
- if (link) router.push(current?.downloadInfo?.link);
+ const link = selectedWallet?.downloadInfo?.link;
+ if (link) window.open(link, '_blank', 'noopener,noreferrer');
}}
- logo={currentWalletData?.logo!.toString() ?? ''}
- name={currentWalletData?.prettyName!}
+ logo={selectedWallet?.walletInfo.logo?.toString() ?? ''}
+ name={selectedWallet?.walletInfo.prettyName ?? ''}
/>
);
case ModalView.Contacts:
@@ -197,6 +203,7 @@ export const TailwindModal: React.FC<
currentAddress,
showMemberManagementModal,
showMessageEditModal,
+ selectedWallet,
]);
return (
diff --git a/components/react/views/NotExist.tsx b/components/react/views/NotExist.tsx
index 13ed9bc5..95b07273 100644
--- a/components/react/views/NotExist.tsx
+++ b/components/react/views/NotExist.tsx
@@ -49,7 +49,7 @@ export const NotExist = ({
To connect your {name} wallet, install the browser extension.