Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: mf-5575 show startup if no wallet exists #11074

Merged
merged 2 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/mask/.webpack/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ export async function createConfiguration(_inputFlags: BuildFlags): Promise<webp
}
}


async function addHTMLEntry(
options: HTMLPlugin.Options & {
gun?: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ export const WalletGuard = memo(function WalletGuard() {
const hitPaymentPasswordGuard = usePaymentPasswordGuard()
const hitMessageGuard = useMessageGuard()

if (!wallet || !wallets.length) {
return (
<>
<WalletHeader />
<WalletStartUp />
</>
)
}
if (hitPaymentPasswordGuard) {
params.set('from', location.pathname)
return <Navigate to={{ pathname: PopupRoutes.SetPaymentPassword, search: params.toString() }} />
Expand All @@ -38,7 +46,7 @@ export const WalletGuard = memo(function WalletGuard() {
return (
<>
<WalletHeader />
{!wallet || !wallets.length ? <WalletStartUp /> : <Outlet context={outletContext} />}
<Outlet context={outletContext} />
</>
)
})
Loading