diff --git a/jslib b/jslib index 92a65b7b..448856cc 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 92a65b7b368a8dbf55350657674c90169b04c30b +Subproject commit 448856cc22510086bfddc99e3f1022ee28727694 diff --git a/src/app/services/services.module.ts b/src/app/services/services.module.ts index b6bf212d..b067be2c 100644 --- a/src/app/services/services.module.ts +++ b/src/app/services/services.module.ts @@ -45,7 +45,6 @@ import { StateMigrationService } from "../../services/stateMigration.service"; import { Account } from "../../models/account"; -import { GlobalStateFactory } from "jslib-common/factories/globalStateFactory"; import { StateFactory } from "jslib-common/factories/stateFactory"; import { GlobalState } from "jslib-common/models/domain/globalState"; @@ -206,7 +205,7 @@ export function initFactory( new StateMigrationService( storageService, secureStorageService, - new GlobalStateFactory(GlobalState) + new StateFactory(GlobalState, Account) ), deps: [StorageServiceAbstraction, "SECURE_STORAGE"], }, @@ -223,7 +222,7 @@ export function initFactory( secureStorageService, logService, stateMigrationService, - true, // TODO: It seems like we aren't applying this from settings anywhere. Is toggling secure storage working? + true, new StateFactory(GlobalState, Account) ), deps: [ diff --git a/src/bwdc.ts b/src/bwdc.ts index 3697662b..58d93bf8 100644 --- a/src/bwdc.ts +++ b/src/bwdc.ts @@ -127,7 +127,7 @@ export class Main { this.stateMigrationService = new StateMigrationService( this.storageService, this.secureStorageService, - new GlobalStateFactory(GlobalState) + new StateFactory(GlobalState, Account) ); this.stateService = new StateService( diff --git a/src/services/state.service.ts b/src/services/state.service.ts index 8f761180..6338dcfd 100644 --- a/src/services/state.service.ts +++ b/src/services/state.service.ts @@ -43,14 +43,17 @@ const keys = { const StoredSecurely = "[STORED SECURELY]"; -export class StateService extends BaseStateService implements StateServiceAbstraction { +export class StateService + extends BaseStateService + implements StateServiceAbstraction +{ constructor( protected storageService: StorageService, protected secureStorageService: StorageService, protected logService: LogService, protected stateMigrationService: StateMigrationService, private useSecureStorageForSecrets = true, - protected stateFactory: StateFactory + protected stateFactory: StateFactory ) { super(storageService, secureStorageService, logService, stateMigrationService, stateFactory); }