Skip to content

Commit

Permalink
fix: add a manifest __TEST_MODE__ check for reset storage
Browse files Browse the repository at this point in the history
  • Loading branch information
pawanpaudel93 committed Jan 14, 2025
1 parent af478a3 commit 4e2bbd7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/wallets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit 4e2bbd7

Please sign in to comment.