From 80ab713ad46ca6bc16425f7609748766449efb43 Mon Sep 17 00:00:00 2001 From: unclebill Date: Fri, 3 Nov 2023 13:59:53 +0800 Subject: [PATCH] fixup! fix: mf-5575 show startup if no wallet exists (#11074) --- .../src/extension/popups/pages/Wallet/WalletGuard/index.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/mask/src/extension/popups/pages/Wallet/WalletGuard/index.tsx b/packages/mask/src/extension/popups/pages/Wallet/WalletGuard/index.tsx index c7347c1266fd..7b907e164600 100644 --- a/packages/mask/src/extension/popups/pages/Wallet/WalletGuard/index.tsx +++ b/packages/mask/src/extension/popups/pages/Wallet/WalletGuard/index.tsx @@ -1,5 +1,5 @@ import { PopupRoutes } from '@masknet/shared-base' -import { useWallet, useWallets } from '@masknet/web3-hooks-base' +import { useWallets } from '@masknet/web3-hooks-base' import { memo } from 'react' import { Navigate, Outlet, useLocation, useOutletContext, useSearchParams } from 'react-router-dom' import Unlock from '../Unlock/index.js' @@ -11,7 +11,6 @@ import { useMessageGuard } from './useMessageGuard.js' import { usePaymentPasswordGuard } from './usePaymentPasswordGuard.js' export const WalletGuard = memo(function WalletGuard() { - const wallet = useWallet() const wallets = useWallets() const outletContext = useOutletContext() const location = useLocation() @@ -21,7 +20,7 @@ export const WalletGuard = memo(function WalletGuard() { const hitPaymentPasswordGuard = usePaymentPasswordGuard() const hitMessageGuard = useMessageGuard() - if (!wallet || !wallets.length) { + if (!wallets.length) { return ( <>