From 3d314018fb08cc408353474f548318e3e012fce6 Mon Sep 17 00:00:00 2001 From: addison Date: Tue, 16 Nov 2021 12:40:38 -0500 Subject: [PATCH] [bug] Adjusted state scope of event collection --- common/src/services/state.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/src/services/state.service.ts b/common/src/services/state.service.ts index 34b21179..182b41ce 100644 --- a/common/src/services/state.service.ts +++ b/common/src/services/state.service.ts @@ -795,12 +795,12 @@ export class StateService implements StateServiceAbstraction { } async getEventCollection(options?: StorageOptions): Promise { - return (await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions)))?.eventCollection; + return (await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions())))?.eventCollection; } async setEventCollection(value: EventData[], options?: StorageOptions): Promise { - const account = await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions)); + const account = await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions())); account.eventCollection = value; - await this.saveAccount(account, this.reconcileOptions(options, this.defaultInMemoryOptions)); + await this.saveAccount(account, this.reconcileOptions(options, await this.defaultOnDiskOptions())); } async getEverBeenUnlocked(options?: StorageOptions): Promise {