From bb079f09978711ef7f2a257478b784892394e3a3 Mon Sep 17 00:00:00 2001 From: im-adithya Date: Wed, 18 Dec 2024 17:20:29 +0530 Subject: [PATCH 1/2] chore: dismiss all before returning home --- pages/settings/wallets/SetupWallet.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pages/settings/wallets/SetupWallet.tsx b/pages/settings/wallets/SetupWallet.tsx index 8b8b404..6da0cfb 100644 --- a/pages/settings/wallets/SetupWallet.tsx +++ b/pages/settings/wallets/SetupWallet.tsx @@ -119,7 +119,10 @@ export function SetupWallet() { position: "top", }); - router.replace("/"); + if (router.canDismiss()) { + router.dismissAll(); + } + router.navigate("/"); }; return ( @@ -133,7 +136,10 @@ export function SetupWallet() { useAppStore .getState() .setSelectedWalletId(walletIdWithConnection); - router.replace("/"); + if (router.canDismiss()) { + router.dismissAll(); + } + router.navigate("/"); }} > From d355e8fd670a1aff3088936d502be9a12256a655 Mon Sep 17 00:00:00 2001 From: im-adithya Date: Tue, 24 Dec 2024 00:46:13 +0530 Subject: [PATCH 2/2] chore: do not navigate after dismiss --- pages/settings/wallets/SetupWallet.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/pages/settings/wallets/SetupWallet.tsx b/pages/settings/wallets/SetupWallet.tsx index bf39d1c..df1fed8 100644 --- a/pages/settings/wallets/SetupWallet.tsx +++ b/pages/settings/wallets/SetupWallet.tsx @@ -134,7 +134,6 @@ export function SetupWallet() { if (router.canDismiss()) { router.dismissAll(); } - router.navigate("/"); }; React.useEffect(() => { @@ -167,7 +166,6 @@ export function SetupWallet() { if (router.canDismiss()) { router.dismissAll(); } - router.navigate("/"); }} >