diff --git a/common/src/services/state.service.ts b/common/src/services/state.service.ts index e29fb448..c21322f5 100644 --- a/common/src/services/state.service.ts +++ b/common/src/services/state.service.ts @@ -1176,13 +1176,10 @@ export class StateService implements StateServiceAbstraction { return globals ?? new GlobalState(); } - private async saveGlobals(globals: GlobalState, options: StorageOptions = { - storageLocation: StorageLocation.Memory, - useSecureStorage: false, - }) { + private async saveGlobals(globals: GlobalState, options: StorageOptions) { return this.useMemory(options.storageLocation) ? this.saveGlobalsToMemory(globals) : - this.saveGlobalsToDisk(globals, options); + await this.saveGlobalsToDisk(globals, options); } private getGlobalsFromMemory(): GlobalState { @@ -1190,7 +1187,7 @@ export class StateService implements StateServiceAbstraction { } private async getGlobalsFromDisk(options: StorageOptions): Promise { - return await this.storageService.get('globals', options); + return (await this.storageService.get('state', options))?.globals; } private saveGlobalsToMemory(globals: GlobalState): void {