1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

await call that creates Customer in case we're upgrading from free (#16999)

This commit is contained in:
Alex Morask
2025-10-23 10:34:16 -05:00
committed by GitHub
parent 3790e09673
commit bb07365ea5

View File

@@ -842,10 +842,9 @@ export class ChangePlanDialogComponent implements OnInit, OnDestroy {
);
const subscriber: BitwardenSubscriber = { type: "organization", data: this.organization };
await Promise.all([
this.subscriberBillingClient.updatePaymentMethod(subscriber, paymentMethod, null),
this.subscriberBillingClient.updateBillingAddress(subscriber, billingAddress),
]);
// These need to be synchronous so one of them can create the Customer in the case we're upgrading from Free.
await this.subscriberBillingClient.updateBillingAddress(subscriber, billingAddress);
await this.subscriberBillingClient.updatePaymentMethod(subscriber, paymentMethod, null);
}
// Backfill pub/priv key if necessary