From f5e27c85321e9a1c96dddaeaf598c453c2062831 Mon Sep 17 00:00:00 2001 From: Andrew Farries Date: Wed, 14 Sep 2022 10:59:12 +0000 Subject: [PATCH] Use `findStripeSubscriptionId` Use the more general `findStripeSubscriptionId` rather than `findStripeSubscriptionIdForTeam` to allow the latter to be safely removed from the server JSON-RPC API. --- components/dashboard/src/components/BillingAccountSelector.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/dashboard/src/components/BillingAccountSelector.tsx b/components/dashboard/src/components/BillingAccountSelector.tsx index 7fd7572a9aea80..76b1246754d391 100644 --- a/components/dashboard/src/components/BillingAccountSelector.tsx +++ b/components/dashboard/src/components/BillingAccountSelector.tsx @@ -27,7 +27,8 @@ export function BillingAccountSelector(props: { onSelected?: () => void }) { const teamsWithBilling: Team[] = []; Promise.all( teams.map(async (t) => { - const subscriptionId = await getGitpodService().server.findStripeSubscriptionIdForTeam(t.id); + const attributionId: string = AttributionId.render({ kind: "team", teamId: t.id }); + const subscriptionId = await getGitpodService().server.findStripeSubscriptionId(attributionId); if (subscriptionId) { teamsWithBilling.push(t); }