From 63dfca2bbab496d2a18e22f79327e3da3a2b3ee4 Mon Sep 17 00:00:00 2001 From: Shane Melton Date: Thu, 4 Sep 2025 14:12:02 -0700 Subject: [PATCH] [PM-24796] Build the ConfigService before it is used during the construction of the DefaultSdkClientService (#16300) --- .../browser/src/background/main.background.ts | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/apps/browser/src/background/main.background.ts b/apps/browser/src/background/main.background.ts index 4d227330184..cccd6bc080f 100644 --- a/apps/browser/src/background/main.background.ts +++ b/apps/browser/src/background/main.background.ts @@ -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,