From 5d6d52d745d5ad58215c16c63f5bce9a609ee3aa Mon Sep 17 00:00:00 2001 From: kyranjamie Date: Fri, 1 Apr 2022 11:02:47 +0200 Subject: [PATCH] fix: bug where wallet doesn't sign out, closes #2341 This bug occurs when the user signs out, say via the popup, but there is another Hiro Wallet window (frame) open at the same time. The other active frame will restore the cached values to its cache, effectively reverting the sign out action. This fix forces other frames to close on sign out. --- src/app/routes/app-routes.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/routes/app-routes.tsx b/src/app/routes/app-routes.tsx index f4999742dcf..cc9e90159d7 100644 --- a/src/app/routes/app-routes.tsx +++ b/src/app/routes/app-routes.tsx @@ -37,7 +37,7 @@ export function AppRoutes(): JSX.Element | null { useSaveAuthRequest(); useOnWalletLock(() => navigate(RouteUrls.Unlock)); - useOnSignOut(() => navigate(RouteUrls.Onboarding)); + useOnSignOut(() => window.close()); useEffect(() => { void analytics.page('view', `${pathname}`);