From 147c0cad656b3cb2ac5b609fe599c330680f098f Mon Sep 17 00:00:00 2001 From: Dan Wang Date: Mon, 4 Mar 2024 14:52:59 -0500 Subject: [PATCH] Update stripe-js for Custom Checkout types --- examples/hooks/11-Custom-Checkout.js | 2 +- package.json | 2 +- src/components/CustomCheckout.tsx | 7 ++++++- yarn.lock | 8 ++++---- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/examples/hooks/11-Custom-Checkout.js b/examples/hooks/11-Custom-Checkout.js index 4d7d6b1..9f99533 100644 --- a/examples/hooks/11-Custom-Checkout.js +++ b/examples/hooks/11-Custom-Checkout.js @@ -94,7 +94,7 @@ const CheckoutForm = () => { return (
-

Payment Dettails

+

Payment Details

Billing Details

diff --git a/package.json b/package.json index 32df83d..3f3fe73 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "@babel/preset-env": "^7.7.1", "@babel/preset-react": "^7.7.0", "@storybook/react": "^6.5.0-beta.8", - "@stripe/stripe-js": "^2.2.0", + "@stripe/stripe-js": "3.0.7", "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.1.1", "@testing-library/react-hooks": "^8.0.0", diff --git a/src/components/CustomCheckout.tsx b/src/components/CustomCheckout.tsx index dac8fd1..f593236 100644 --- a/src/components/CustomCheckout.tsx +++ b/src/components/CustomCheckout.tsx @@ -38,8 +38,13 @@ export const parseCustomCheckoutSdkContext = ( return ctx; }; +type StripeCustomCheckoutActions = Omit< + Omit, + 'on' +>; + interface CustomCheckoutContextValue - extends stripeJs.StripeCustomCheckoutActions, + extends StripeCustomCheckoutActions, stripeJs.StripeCustomCheckoutSession {} const CustomCheckoutContext = React.createContext( null diff --git a/yarn.lock b/yarn.lock index a6d8cb1..8238765 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2130,10 +2130,10 @@ regenerator-runtime "^0.13.7" resolve-from "^5.0.0" -"@stripe/stripe-js@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@stripe/stripe-js/-/stripe-js-2.2.0.tgz#d5eeeae2efa5a9167fd74a047eceef8be3281b55" - integrity sha512-YyXQbsXvnNRJ6MofFhCLIQ4W7UpfkfSOQhjIaHEiCMBv3IBxhzugXiYNNzceGTK/7DL31v7HtTnkJ+FI+6AIow== +"@stripe/stripe-js@3.0.7": + version "3.0.7" + resolved "https://registry.yarnpkg.com/@stripe/stripe-js/-/stripe-js-3.0.7.tgz#ceec7db210830d742c1ba2a697ddaf3a210542af" + integrity sha512-qmjTsxnst84iWDsGqPxk5Wlff/fG4nSFjy/r24t9WWFAlCuvwnuUAe4eGgbqZBng019AtgWvo8wuhM3Y5/olbw== "@testing-library/dom@^8.5.0": version "8.13.0"