We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents da55ebd + 0b48430 commit 0e43225Copy full SHA for 0e43225
1 file changed
packages/fxa-auth-server/lib/routes/subscriptions/mozilla.ts
@@ -26,6 +26,7 @@ import type { AppendedPlayStoreSubscriptionPurchase } from 'fxa-shared/payments/
26
import type { AppendedAppStoreSubscriptionPurchase } from 'fxa-shared/payments/iap/apple-app-store/types';
27
import { VError } from 'verror';
28
import type { ConfigType } from '../../../config';
29
+import { sanitizePlans } from './stripe';
30
31
const DEFAULT_CURRENCY = 'usd';
32
@@ -227,7 +228,9 @@ export class MozillaSubscriptionHandler {
227
228
229
return {
230
eligibility: result.subscriptionEligibilityResult,
- currentPlan: result.eligibleSourcePlan,
231
+ currentPlan:
232
+ result.eligibleSourcePlan &&
233
+ sanitizePlans([result.eligibleSourcePlan]).at(0),
234
};
235
}
236
0 commit comments