Skip to content

Commit

Permalink
Fixing strict types in checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
corbanbrook committed Apr 26, 2024
1 parent 4908ad1 commit 3bcf8af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/checkout/src/shared/components/PaperTransaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -48,7 +48,7 @@ export const PaperTransaction = ({ settings }: PaperTransactionProps) => {
setNavigation({
location: 'transaction-error',
params: {
error: e
error: e as Error
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion packages/checkout/src/views/PendingTransaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const PendingTransaction = () => {
setNavigation({
location: 'transaction-error',
params: {
error: e
error: e as Error
}
})
}
Expand Down

0 comments on commit 3bcf8af

Please sign in to comment.