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:
@@ -576,7 +576,7 @@ export default class MainBackground {
|
||||
);
|
||||
|
||||
this.billingAccountProfileStateService = new DefaultBillingAccountProfileStateService(
|
||||
this.activeUserStateProvider,
|
||||
this.stateProvider,
|
||||
);
|
||||
|
||||
this.loginStrategyService = new LoginStrategyService(
|
||||
|
||||
@@ -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)),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user