From 7458fe4a08dbc5a7068f52d945747cec0ce77712 Mon Sep 17 00:00:00 2001 From: addison Date: Tue, 16 Nov 2021 10:00:08 -0500 Subject: [PATCH] [bug] Adjust state scope for everBeenUnlocked --- common/src/services/state.service.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/src/services/state.service.ts b/common/src/services/state.service.ts index 0936a130..9d74af41 100644 --- a/common/src/services/state.service.ts +++ b/common/src/services/state.service.ts @@ -798,12 +798,13 @@ export class StateService implements StateServiceAbstraction { } async getEverBeenUnlocked(options?: StorageOptions): Promise { - return (await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions())))?.everBeenUnlocked ?? false; + return (await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions)))?.everBeenUnlocked ?? false; } + async setEverBeenUnlocked(value: boolean, options?: StorageOptions): Promise { - const account = await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions())); + const account = await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions)); account.everBeenUnlocked = value; - await this.saveAccount(account, this.reconcileOptions(options, await this.defaultOnDiskOptions())); + await this.saveAccount(account, this.reconcileOptions(options, this.defaultInMemoryOptions)); } async getForcePasswordReset(options?: StorageOptions): Promise {