From f6e274a9a03de78d7df1cd5fcc9e76c308b56462 Mon Sep 17 00:00:00 2001 From: addison Date: Mon, 31 Jan 2022 14:21:06 -0500 Subject: [PATCH 1/4] [chore] Update jslib --- src/background/main.background.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/background/main.background.ts b/src/background/main.background.ts index ebeb89d11d..3f227e55ec 100644 --- a/src/background/main.background.ts +++ b/src/background/main.background.ts @@ -1,8 +1,8 @@ import { CipherRepromptType } from "jslib-common/enums/cipherRepromptType"; import { CipherType } from "jslib-common/enums/cipherType"; -import { AccountFactory } from "jslib-common/models/domain/account"; import { CipherView } from "jslib-common/models/view/cipherView"; +import { GlobalState } from "jslib-common/models/domain/globalState"; import { ApiService } from "jslib-common/services/api.service"; import { AppIdService } from "jslib-common/services/appId.service"; @@ -97,6 +97,9 @@ import VaultTimeoutService from "../services/vaultTimeout.service"; import { Account } from "../models/account"; +import { GlobalStateFactory } from "jslib-common/factories/globalStateFactory"; +import { StateFactory } from "jslib-common/factories/stateFactory"; + export default class MainBackground { messagingService: MessagingServiceAbstraction; storageService: StorageServiceAbstraction; @@ -166,14 +169,15 @@ export default class MainBackground { this.logService = new ConsoleLogService(false); this.stateMigrationService = new StateMigrationService( this.storageService, - this.secureStorageService + this.secureStorageService, + new GlobalStateFactory(GlobalState), ); this.stateService = new StateService( this.storageService, this.secureStorageService, this.logService, this.stateMigrationService, - new AccountFactory(Account) + new StateFactory(GlobalState, Account) ); this.platformUtilsService = new BrowserPlatformUtilsService( this.messagingService, From 66e6ea3908c563f1cc260e4fd9099c29edc5189c Mon Sep 17 00:00:00 2001 From: addison Date: Mon, 31 Jan 2022 14:43:01 -0500 Subject: [PATCH 2/4] [chore] Update jslib --- jslib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jslib b/jslib index e372bf242b..92a65b7b36 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit e372bf242b24f55c1142e33693ad2c801ab74c93 +Subproject commit 92a65b7b368a8dbf55350657674c90169b04c30b From 4f9a74127861609be83a1ccaf075904621c9007d Mon Sep 17 00:00:00 2001 From: addison Date: Mon, 31 Jan 2022 14:46:04 -0500 Subject: [PATCH 3/4] [style] Lint fixes --- src/background/main.background.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/background/main.background.ts b/src/background/main.background.ts index 3f227e55ec..a50591b055 100644 --- a/src/background/main.background.ts +++ b/src/background/main.background.ts @@ -2,6 +2,7 @@ import { CipherRepromptType } from "jslib-common/enums/cipherRepromptType"; import { CipherType } from "jslib-common/enums/cipherType"; import { CipherView } from "jslib-common/models/view/cipherView"; + import { GlobalState } from "jslib-common/models/domain/globalState"; import { ApiService } from "jslib-common/services/api.service"; From c4844b99431baa55bb2655333975059df8358275 Mon Sep 17 00:00:00 2001 From: addison Date: Mon, 31 Jan 2022 14:48:52 -0500 Subject: [PATCH 4/4] [style] Ran prettier --- src/background/main.background.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/background/main.background.ts b/src/background/main.background.ts index a50591b055..be5988b0fb 100644 --- a/src/background/main.background.ts +++ b/src/background/main.background.ts @@ -171,7 +171,7 @@ export default class MainBackground { this.stateMigrationService = new StateMigrationService( this.storageService, this.secureStorageService, - new GlobalStateFactory(GlobalState), + new GlobalStateFactory(GlobalState) ); this.stateService = new StateService( this.storageService,