mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 05:43:41 +00:00
Fix missed service dependency changes (#8305)
This commit is contained in:
@@ -458,7 +458,7 @@ export default class MainBackground {
|
|||||||
this.biometricStateService,
|
this.biometricStateService,
|
||||||
);
|
);
|
||||||
this.tokenService = new TokenService(this.stateService);
|
this.tokenService = new TokenService(this.stateService);
|
||||||
this.appIdService = new AppIdService(this.storageService);
|
this.appIdService = new AppIdService(this.globalStateProvider);
|
||||||
this.apiService = new ApiService(
|
this.apiService = new ApiService(
|
||||||
this.tokenService,
|
this.tokenService,
|
||||||
this.platformUtilsService,
|
this.platformUtilsService,
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
import { DiskStorageOptions } from "@koa/multer";
|
|
||||||
|
|
||||||
import { AppIdService as AbstractAppIdService } from "@bitwarden/common/platform/abstractions/app-id.service";
|
import { AppIdService as AbstractAppIdService } from "@bitwarden/common/platform/abstractions/app-id.service";
|
||||||
import { AppIdService } from "@bitwarden/common/platform/services/app-id.service";
|
import { AppIdService } from "@bitwarden/common/platform/services/app-id.service";
|
||||||
|
|
||||||
import { FactoryOptions, CachedServices, factory } from "./factory-options";
|
import { FactoryOptions, CachedServices, factory } from "./factory-options";
|
||||||
import { diskStorageServiceFactory } from "./storage-service.factory";
|
import {
|
||||||
|
GlobalStateProviderInitOptions,
|
||||||
|
globalStateProviderFactory,
|
||||||
|
} from "./global-state-provider.factory";
|
||||||
|
|
||||||
type AppIdServiceFactoryOptions = FactoryOptions;
|
type AppIdServiceFactoryOptions = FactoryOptions;
|
||||||
|
|
||||||
export type AppIdServiceInitOptions = AppIdServiceFactoryOptions & DiskStorageOptions;
|
export type AppIdServiceInitOptions = AppIdServiceFactoryOptions & GlobalStateProviderInitOptions;
|
||||||
|
|
||||||
export function appIdServiceFactory(
|
export function appIdServiceFactory(
|
||||||
cache: { appIdService?: AbstractAppIdService } & CachedServices,
|
cache: { appIdService?: AbstractAppIdService } & CachedServices,
|
||||||
@@ -18,6 +19,6 @@ export function appIdServiceFactory(
|
|||||||
cache,
|
cache,
|
||||||
"appIdService",
|
"appIdService",
|
||||||
opts,
|
opts,
|
||||||
async () => new AppIdService(await diskStorageServiceFactory(cache, opts)),
|
async () => new AppIdService(await globalStateProviderFactory(cache, opts)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -333,7 +333,7 @@ export class Main {
|
|||||||
this.stateProvider,
|
this.stateProvider,
|
||||||
);
|
);
|
||||||
|
|
||||||
this.appIdService = new AppIdService(this.storageService);
|
this.appIdService = new AppIdService(this.globalStateProvider);
|
||||||
this.tokenService = new TokenService(this.stateService);
|
this.tokenService = new TokenService(this.stateService);
|
||||||
|
|
||||||
const customUserAgent =
|
const customUserAgent =
|
||||||
|
|||||||
@@ -290,7 +290,7 @@ import { ModalService } from "./modal.service";
|
|||||||
{
|
{
|
||||||
provide: AppIdServiceAbstraction,
|
provide: AppIdServiceAbstraction,
|
||||||
useClass: AppIdService,
|
useClass: AppIdService,
|
||||||
deps: [AbstractStorageService],
|
deps: [GlobalStateProvider],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provide: AuditServiceAbstraction,
|
provide: AuditServiceAbstraction,
|
||||||
|
|||||||
Reference in New Issue
Block a user