diff --git a/libs/common/src/billing/services/account/billing-account-profile-state.service.ts b/libs/common/src/billing/services/account/billing-account-profile-state.service.ts index 155ce1493b4..efb22086075 100644 --- a/libs/common/src/billing/services/account/billing-account-profile-state.service.ts +++ b/libs/common/src/billing/services/account/billing-account-profile-state.service.ts @@ -68,15 +68,18 @@ export class DefaultBillingAccountProfileStateService implements BillingAccountP this.hasPremiumFromAnyOrganization$(userId), ]).pipe( concatMap(async ([hasPremiumPersonally, hasPremiumFromOrg]) => { - const isCloud = !this.platformUtilsService.isSelfHost(); - - let billing = null; - if (isCloud) { - billing = await this.apiService.getUserBillingHistory(); + if (hasPremiumPersonally === true || !hasPremiumFromOrg === true) { + return true; } - const cloudAndBillingHistory = isCloud && !billing?.hasNoHistory; - return hasPremiumPersonally || !hasPremiumFromOrg || cloudAndBillingHistory; + const isCloud = !this.platformUtilsService.isSelfHost(); + + if (isCloud) { + const billing = await this.apiService.getUserBillingHistory(); + return !billing?.hasNoHistory; + } + + return false; }), ); }