diff --git a/common/src/services/state.service.ts b/common/src/services/state.service.ts index f97c36f1403..a0178fd3b53 100644 --- a/common/src/services/state.service.ts +++ b/common/src/services/state.service.ts @@ -58,6 +58,8 @@ export class StateService protected state: State = new State(); + private hasBeenInited: boolean = false; + constructor( protected storageService: StorageService, protected secureStorageService: StorageService, @@ -67,11 +69,16 @@ export class StateService ) {} async init(): Promise { + if (this.hasBeenInited) { + return; + } + if (await this.stateMigrationService.needsMigration()) { await this.stateMigrationService.migrate(); } await this.initAccountState(); + this.hasBeenInited = true; } async initAccountState() {