diff --git a/src/app/pages/onboarding/welcome/welcome.tsx b/src/app/pages/onboarding/welcome/welcome.tsx index fae11bd2dc8..b513e63bcaf 100644 --- a/src/app/pages/onboarding/welcome/welcome.tsx +++ b/src/app/pages/onboarding/welcome/welcome.tsx @@ -67,15 +67,22 @@ export function WelcomePage() { const restoreWallet = pageModeRoutingAction(RouteUrls.SignIn); + const onSelectConnectLedger = useCallback(async () => { + await keyActions.signOut(); + if (doesBrowserSupportWebUsbApi()) { + supportsWebUsbAction(); + } else { + doesNotSupportWebUsbAction(); + } + }, [doesNotSupportWebUsbAction, keyActions, supportsWebUsbAction]); + return ( <> - doesBrowserSupportWebUsbApi() ? supportsWebUsbAction() : doesNotSupportWebUsbAction() - } + onSelectConnectLedger={onSelectConnectLedger} onStartOnboarding={() => startOnboarding()} onRestoreWallet={() => restoreWallet()} />