From b7d9a532cb4e45d3b746bced68e9de0229e28420 Mon Sep 17 00:00:00 2001 From: Addison Beck Date: Thu, 10 Feb 2022 23:46:42 -0500 Subject: [PATCH] [bug] Store everBeenUnlocked in memory (#667) --- common/src/services/state.service.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/common/src/services/state.service.ts b/common/src/services/state.service.ts index a11c1a5c4b..376f006336 100644 --- a/common/src/services/state.service.ts +++ b/common/src/services/state.service.ts @@ -1468,20 +1468,17 @@ export class StateService< async getEverBeenUnlocked(options?: StorageOptions): Promise { return ( - (await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions()))) - ?.profile?.everBeenUnlocked ?? false + (await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions)))?.profile + ?.everBeenUnlocked ?? false ); } async setEverBeenUnlocked(value: boolean, options?: StorageOptions): Promise { const account = await this.getAccount( - this.reconcileOptions(options, await this.defaultOnDiskOptions()) + this.reconcileOptions(options, this.defaultInMemoryOptions) ); account.profile.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 {