Skip to content

Commit

Permalink
chore: test
Browse files Browse the repository at this point in the history
  • Loading branch information
LuizAsFight committed Jan 2, 2025
1 parent ba6fef9 commit 4687bbd
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/app/src/systems/Core/services/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,18 @@ import { chromeStorage } from './chromeStorage';
// biome-ignore lint/complexity/noStaticOnlyClass: <explanation>
export class CoreService {
static async clear() {
await chromeStorage.clear();
await VaultService.clear();
await db.clear();
Storage.clear();
await clearParallelDb();
await cleanOPFS();
try {
// this ones can fail depending on environment
Storage.clear();
await chromeStorage.clear();
await cleanOPFS();
} catch (e) {
console.error(e);
}

const reloadAfterCleanCompleted = () => {
const isLogged = Storage.getItem(IS_LOGGED_KEY);
if (!isLogged) {
Expand All @@ -23,6 +29,7 @@ export class CoreService {
}
setTimeout(() => reloadAfterCleanCompleted(), 50);
};

reloadAfterCleanCompleted();
}
}

0 comments on commit 4687bbd

Please sign in to comment.