From 4e2bbd7b97ed6f051f1350f40cd749172d112182 Mon Sep 17 00:00:00 2001 From: Pawan Paudel Date: Tue, 14 Jan 2025 23:01:15 +0545 Subject: [PATCH] fix: add a manifest __TEST_MODE__ check for reset storage --- src/wallets/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wallets/index.ts b/src/wallets/index.ts index 32e07369..1e8cfded 100644 --- a/src/wallets/index.ts +++ b/src/wallets/index.ts @@ -111,7 +111,11 @@ export async function openOrSelectWelcomePage(force = false) { // Make sure we clear any stored value from previous installations before // opening the welcome page to onboard the user: - await resetStorage(); + // Skip reset for test environment + const manifest = browser.runtime.getManifest(); + if (manifest["__TEST_MODE__"] !== true) { + await resetStorage(); + } const url = browser.runtime.getURL("tabs/welcome.html"); const welcomePageTabs = await browser.tabs.query({ url });