Skip to content

Commit 12fceaf

Browse files
authored
Fix/publishable key (#503)
* fix(): use correct stripe publishable key * chore(): bump components version
1 parent 21f3729 commit 12fceaf

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@schematichq/schematic-components",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"main": "dist/schematic-components.cjs.js",
55
"module": "dist/schematic-components.esm.js",
66
"types": "dist/schematic-components.d.ts",

components/src/components/elements/payment-method/PaymentMethodDetails.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,13 @@ export const PaymentMethodDetails = ({
186186

187187
useEffect(() => {
188188
if (!stripe && setupIntent) {
189-
const publishableKey =
189+
let publishableKey =
190190
setupIntent.publishableKey || setupIntent.schematicPublishableKey;
191+
191192
const stripeOptions: StripeConstructorOptions = {};
192193

193194
if (setupIntent.accountId) {
195+
publishableKey = setupIntent.schematicPublishableKey;
194196
stripeOptions.stripeAccount = setupIntent.accountId;
195197
}
196198

0 commit comments

Comments
 (0)