From c98c12c01faf6f62d88098181e56a8a1c46473f2 Mon Sep 17 00:00:00 2001 From: Roland Bewick Date: Wed, 27 Sep 2023 11:32:00 +0700 Subject: [PATCH] chore: update TODOs --- packages/app-store/alby/components/AlbyPaymentComponent.tsx | 3 ++- packages/app-store/alby/lib/parseInvoice.ts | 1 + packages/app-store/alby/pages/setup/index.tsx | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/app-store/alby/components/AlbyPaymentComponent.tsx b/packages/app-store/alby/components/AlbyPaymentComponent.tsx index 9096279445..1653ccaa68 100644 --- a/packages/app-store/alby/components/AlbyPaymentComponent.tsx +++ b/packages/app-store/alby/components/AlbyPaymentComponent.tsx @@ -123,7 +123,8 @@ export const AlbyPaymentComponent = (props: IAlbyPaymentComponentProps) => { type PaymentCheckerProps = PaymentPageProps; function PaymentChecker(props: PaymentCheckerProps) { - // FIXME: booking success is copied from packages/features/ee/payments/components/Payment.tsx + // TODO: move booking success code to a common lib function + // TODO: subscribe rather than polling const searchParams = useSearchParams(); const bookingSuccessRedirect = useBookingSuccessRedirect(); const utils = trpc.useContext(); diff --git a/packages/app-store/alby/lib/parseInvoice.ts b/packages/app-store/alby/lib/parseInvoice.ts index efc5aa70b3..338b85f5d6 100644 --- a/packages/app-store/alby/lib/parseInvoice.ts +++ b/packages/app-store/alby/lib/parseInvoice.ts @@ -15,6 +15,7 @@ export default function parseInvoice( return wh.verify(body, headers) as Invoice; } catch (err) { // Looks like alby might sent multiple webhooks for the same invoice but it should only work once + // TODO: remove the Alby webhook when uninstalling the Alby app console.error(err); } return null; diff --git a/packages/app-store/alby/pages/setup/index.tsx b/packages/app-store/alby/pages/setup/index.tsx index 8c12cce23b..5629ecc3d9 100644 --- a/packages/app-store/alby/pages/setup/index.tsx +++ b/packages/app-store/alby/pages/setup/index.tsx @@ -99,6 +99,7 @@ function AlbySetupPage(props: IAlbySetupProps) { const client = new Client(authClient); const accountInfo = await client.accountInformation({}); + // TODO: add a way to delete the endpoint when the app is uninstalled const webhookEndpoint = await client.createWebhookEndpoint({ filter_types: ["invoice.incoming.settled"], url: `${process.env.NEXT_PUBLIC_WEBAPP_URL}/api/integrations/alby/webhook`,