From d70bf0f2f8452291ab3c2994d327d7c9ef48830b Mon Sep 17 00:00:00 2001 From: Mart <46025304+martgil@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:28:31 +0800 Subject: [PATCH] Reduce GlobalStore accounts in addition to sessionStorage removal (#5849) * Reduce GlobalStore accounts in addition to sessionStorage removal * use better variable names * pr reviews: apply corrections --- extension/js/common/settings.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/js/common/settings.ts b/extension/js/common/settings.ts index a50b930f189..cf0dceda2f6 100644 --- a/extension/js/common/settings.ts +++ b/extension/js/common/settings.ts @@ -88,6 +88,7 @@ export class Settings { if (!acctEmails.includes(acctEmail)) { throw new Error(`"${acctEmail}" is not a known account_email in "${JSON.stringify(acctEmails)}"`); } + await GlobalStore.acctEmailsRemove(acctEmail); const storageIndexesToRemove: AccountIndex[] = []; const filter = AbstractStore.singleScopeRawIndex(acctEmail, ''); if (!filter) { @@ -190,7 +191,6 @@ export class Settings { } } await Settings.acctStorageReset(oldAcctEmail); - await GlobalStore.acctEmailsRemove(oldAcctEmail); } public static async renderPrvCompatFixUiAndWaitTilSubmittedByUser(