[PM-24796] Build the ConfigService before it is used during the construction of the DefaultSdkClientService (#16300)

This commit is contained in:
Shane Melton 2025-09-04 14:12:02 -07:00 committed by GitHub
parent e3f55d793d
commit 63dfca2bba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -777,6 +777,25 @@ export default class MainBackground {
this.stateProvider,
);
this.authService = new AuthService(
this.accountService,
this.messagingService,
this.keyService,
this.apiService,
this.stateService,
this.tokenService,
);
this.configApiService = new ConfigApiService(this.apiService);
this.configService = new DefaultConfigService(
this.configApiService,
this.environmentService,
this.logService,
this.stateProvider,
this.authService,
);
const sdkClientFactory = flagEnabled("sdk")
? new DefaultSdkClientFactory()
: new NoopSdkClientFactory();
@ -839,25 +858,6 @@ export default class MainBackground {
this.authRequestApiService,
);
this.authService = new AuthService(
this.accountService,
this.messagingService,
this.keyService,
this.apiService,
this.stateService,
this.tokenService,
);
this.configApiService = new ConfigApiService(this.apiService);
this.configService = new DefaultConfigService(
this.configApiService,
this.environmentService,
this.logService,
this.stateProvider,
this.authService,
);
this.billingAccountProfileStateService = new DefaultBillingAccountProfileStateService(
this.stateProvider,
this.platformUtilsService,