1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-21 11:35:34 +01:00

Fix missed service dependency changes (#8305)

This commit is contained in:
Matt Gibson 2024-03-12 11:12:12 -05:00 committed by GitHub
parent 1f41d7871c
commit ddac10136f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 9 additions and 8 deletions

View File

@ -458,7 +458,7 @@ export default class MainBackground {
this.biometricStateService,
);
this.tokenService = new TokenService(this.stateService);
this.appIdService = new AppIdService(this.storageService);
this.appIdService = new AppIdService(this.globalStateProvider);
this.apiService = new ApiService(
this.tokenService,
this.platformUtilsService,

View File

@ -1,14 +1,15 @@
import { DiskStorageOptions } from "@koa/multer";
import { AppIdService as AbstractAppIdService } from "@bitwarden/common/platform/abstractions/app-id.service";
import { AppIdService } from "@bitwarden/common/platform/services/app-id.service";
import { FactoryOptions, CachedServices, factory } from "./factory-options";
import { diskStorageServiceFactory } from "./storage-service.factory";
import {
GlobalStateProviderInitOptions,
globalStateProviderFactory,
} from "./global-state-provider.factory";
type AppIdServiceFactoryOptions = FactoryOptions;
export type AppIdServiceInitOptions = AppIdServiceFactoryOptions & DiskStorageOptions;
export type AppIdServiceInitOptions = AppIdServiceFactoryOptions & GlobalStateProviderInitOptions;
export function appIdServiceFactory(
cache: { appIdService?: AbstractAppIdService } & CachedServices,
@ -18,6 +19,6 @@ export function appIdServiceFactory(
cache,
"appIdService",
opts,
async () => new AppIdService(await diskStorageServiceFactory(cache, opts)),
async () => new AppIdService(await globalStateProviderFactory(cache, opts)),
);
}

View File

@ -333,7 +333,7 @@ export class Main {
this.stateProvider,
);
this.appIdService = new AppIdService(this.storageService);
this.appIdService = new AppIdService(this.globalStateProvider);
this.tokenService = new TokenService(this.stateService);
const customUserAgent =

View File

@ -290,7 +290,7 @@ import { ModalService } from "./modal.service";
{
provide: AppIdServiceAbstraction,
useClass: AppIdService,
deps: [AbstractStorageService],
deps: [GlobalStateProvider],
},
{
provide: AuditServiceAbstraction,