Skip to content

Commit

Permalink
fixup! fix: mf-5575 show startup if no wallet exists (#11074)
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleBill authored and guanbinrui committed Nov 3, 2023
1 parent b0a2971 commit 80ab713
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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()
Expand All @@ -21,7 +20,7 @@ export const WalletGuard = memo(function WalletGuard() {
const hitPaymentPasswordGuard = usePaymentPasswordGuard()
const hitMessageGuard = useMessageGuard()

if (!wallet || !wallets.length) {
if (!wallets.length) {
return (
<>
<WalletHeader />
Expand Down

0 comments on commit 80ab713

Please sign in to comment.