From 3bcf8afa830a938aeb9627e691ab83be602e73e2 Mon Sep 17 00:00:00 2001 From: Corban Riley Date: Fri, 26 Apr 2024 09:33:30 -0400 Subject: [PATCH] Fixing strict types in checkout --- .../checkout/src/shared/components/PaperTransaction.tsx | 6 +++--- packages/checkout/src/views/PendingTransaction.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/checkout/src/shared/components/PaperTransaction.tsx b/packages/checkout/src/shared/components/PaperTransaction.tsx index c3b07a3d..79fc89ef 100644 --- a/packages/checkout/src/shared/components/PaperTransaction.tsx +++ b/packages/checkout/src/shared/components/PaperTransaction.tsx @@ -30,11 +30,11 @@ export const PaperTransaction = ({ settings }: PaperTransactionProps) => { setPaperSecretLoading(true) try { if (!email) { - throw 'No email address found' + throw new Error('No email address found') } if (!settings.creditCardCheckout) { - throw 'No credit card checkout settings found' + throw new Error('No credit card checkout settings found') } const secret = await fetchPaperSecret({ @@ -48,7 +48,7 @@ export const PaperTransaction = ({ settings }: PaperTransactionProps) => { setNavigation({ location: 'transaction-error', params: { - error: e + error: e as Error } }) } diff --git a/packages/checkout/src/views/PendingTransaction.tsx b/packages/checkout/src/views/PendingTransaction.tsx index b07e572f..62808393 100644 --- a/packages/checkout/src/views/PendingTransaction.tsx +++ b/packages/checkout/src/views/PendingTransaction.tsx @@ -58,7 +58,7 @@ export const PendingTransaction = () => { setNavigation({ location: 'transaction-error', params: { - error: e + error: e as Error } }) }