From 902661cd789474d10a6924d28f900e4e8329fae2 Mon Sep 17 00:00:00 2001 From: zzggo Date: Mon, 21 Jul 2025 18:07:40 +1000 Subject: [PATCH 1/4] fixed: wallet tab redirect and coinlist ui scroll height Closes #1198 --- src/ui/views/Dashboard/wallet-tab.tsx | 2 +- src/ui/views/SortHat.tsx | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/ui/views/Dashboard/wallet-tab.tsx b/src/ui/views/Dashboard/wallet-tab.tsx index d106c5316..5d7d56a07 100644 --- a/src/ui/views/Dashboard/wallet-tab.tsx +++ b/src/ui/views/Dashboard/wallet-tab.tsx @@ -63,7 +63,7 @@ const WalletTab = ({ network }) => { flexDirection: 'column', backgroundColor: 'black', width: '100%', - height: '100%', + height: 'auto', }} > { let approval = await getApproval(); if (!wallet) { setTo('/unlock'); + return; } if (isInNotification && !approval) { @@ -35,8 +36,13 @@ const SortHat = () => { approval = undefined; } - if (!(await wallet.isBooted()) && !isInTab) { - openInternalPageInTab('welcome'); + // For fresh installation, go to welcome page regardless of popup/tab mode + if (!(await wallet.isBooted())) { + if (isInTab) { + setTo('/welcome'); + } else { + openInternalPageInTab('welcome'); + } return; } From 6f17749e3275bcb56ce181fb5a3d096e2b39b557 Mon Sep 17 00:00:00 2001 From: zzggo Date: Tue, 22 Jul 2025 10:23:39 +1000 Subject: [PATCH 2/4] fixed: revert return Closes #1198 --- src/ui/views/SortHat.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ui/views/SortHat.tsx b/src/ui/views/SortHat.tsx index 04e517d90..f1241c2aa 100644 --- a/src/ui/views/SortHat.tsx +++ b/src/ui/views/SortHat.tsx @@ -21,7 +21,6 @@ const SortHat = () => { let approval = await getApproval(); if (!wallet) { setTo('/unlock'); - return; } if (isInNotification && !approval) { From c057f20a23fe1732c8f7deeda00be9dea68ec9ff Mon Sep 17 00:00:00 2001 From: Tom Beckenham <34339192+tombeckenham@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:08:53 +1000 Subject: [PATCH 3/4] Update private route so that it opens welcome page in a tab Closes #1198 --- src/ui/components/PrivateRoute.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/ui/components/PrivateRoute.tsx b/src/ui/components/PrivateRoute.tsx index 45e93496d..e64b5be3b 100644 --- a/src/ui/components/PrivateRoute.tsx +++ b/src/ui/components/PrivateRoute.tsx @@ -3,6 +3,9 @@ import { Navigate } from 'react-router'; import { useWallet } from '@/ui/hooks/use-wallet'; +import { getUiType } from '../utils'; +import { openInternalPageInTab } from '../utils/webapi'; + const PrivateRoute = ({ children }) => { const wallet = useWallet(); @@ -10,6 +13,7 @@ const PrivateRoute = ({ children }) => { const [unlocked, setUnlocked] = useState(false); const [loading, setLoading] = useState(true); + const uiType = getUiType(); // Everything through the wallet controller is async, so we need to check if the wallet is booted and unlocked in a useEffect useEffect(() => { let mounted = true; @@ -40,11 +44,18 @@ const PrivateRoute = ({ children }) => { }, [wallet]); if (loading) { + // If we haven't loaded, we can't make a decision on whether to render the children + // so we return null return null; } if (!booted) { - return ; + if (uiType.isTab) { + return ; + } else { + openInternalPageInTab('welcome'); + return null; + } } if (!unlocked) { From a868e112fc8a06828a1bfcace8bce47e2a1dc6d1 Mon Sep 17 00:00:00 2001 From: Tom Beckenham <34339192+tombeckenham@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:16:23 +1000 Subject: [PATCH 4/4] Changed to min height Closes #1198 --- src/ui/views/Dashboard/wallet-tab.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/views/Dashboard/wallet-tab.tsx b/src/ui/views/Dashboard/wallet-tab.tsx index 5d7d56a07..90ce9560f 100644 --- a/src/ui/views/Dashboard/wallet-tab.tsx +++ b/src/ui/views/Dashboard/wallet-tab.tsx @@ -63,7 +63,7 @@ const WalletTab = ({ network }) => { flexDirection: 'column', backgroundColor: 'black', width: '100%', - height: 'auto', + minHeight: '100%', }} >