1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-23 03:33:54 +00:00

[PM-7071] Fallback to Emitting null When No Active User (#8486)

* Fallback to Emitting `null` When No Active User

* Fix Tests

* Update Test Names to Follow Convention

Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>

* Fix CLI Build

---------

Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>
This commit is contained in:
Justin Baur
2024-03-26 11:06:33 -05:00
committed by GitHub
parent 7f14ee4994
commit f7014a973c
6 changed files with 108 additions and 122 deletions

View File

@@ -576,7 +576,7 @@ export default class MainBackground {
);
this.billingAccountProfileStateService = new DefaultBillingAccountProfileStateService(
this.activeUserStateProvider,
this.stateProvider,
);
this.loginStrategyService = new LoginStrategyService(

View File

@@ -1,9 +1,8 @@
import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service";
import { DefaultBillingAccountProfileStateService } from "@bitwarden/common/billing/services/account/billing-account-profile-state.service";
import { activeUserStateProviderFactory } from "./active-user-state-provider.factory";
import { FactoryOptions, CachedServices, factory } from "./factory-options";
import { StateProviderInitOptions } from "./state-provider.factory";
import { StateProviderInitOptions, stateProviderFactory } from "./state-provider.factory";
type BillingAccountProfileStateServiceFactoryOptions = FactoryOptions;
@@ -21,8 +20,6 @@ export function billingAccountProfileStateServiceFactory(
"billingAccountProfileStateService",
opts,
async () =>
new DefaultBillingAccountProfileStateService(
await activeUserStateProviderFactory(cache, opts),
),
new DefaultBillingAccountProfileStateService(await stateProviderFactory(cache, opts)),
);
}