fix: only set stripe app data if it requires payment (#11623)
Co-authored-by: alannnc <[email protected]>
This commit is contained in:
1 parent
41b6377f29
commit
e568d70e65
1 file changed
+8
-6
@@ -48,13 +48,15 @@ const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({
|
||||
.trim();
|
||||
|
||||
useEffect(() => {
|
||||
if (!getAppData("currency")) {
|
||||
setAppData("currency", currencyOptions[0].value);
|
||||
if (requirePayment) {
|
||||
if (!getAppData("currency")) {
|
||||
setAppData("currency", currencyOptions[0].value);
|
||||
}
|
||||
if (!getAppData("paymentOption")) {
|
||||
setAppData("paymentOption", paymentOptions[0].value);
|
||||
}
|
||||
}
|
||||
if (!getAppData("paymentOption")) {
|
||||
setAppData("paymentOption", paymentOptions[0].value);
|
||||
}
|
||||
}, []);
|
||||
}, [requirePayment, getAppData, setAppData]);
|
||||
|
||||
return (
|
||||
<AppCard
|
||||
|
||||
Reference in new issue
Block a user