From 3cfc3b21910beb01b1e3505d363e2077025fa754 Mon Sep 17 00:00:00 2001 From: Saksham Sharma Date: Thu, 14 Nov 2024 13:01:17 +0530 Subject: [PATCH] fix: card holder name --- src/Components/DynamicFields.res | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Components/DynamicFields.res b/src/Components/DynamicFields.res index 2c6f9ea3..b7979a84 100644 --- a/src/Components/DynamicFields.res +++ b/src/Components/DynamicFields.res @@ -40,15 +40,21 @@ let make = ( if paymentMethod === "card" { let creditRequiredFields = creditPaymentMethodTypes.required_fields - paymentMethodTypes.required_fields - ->Array.concat(creditRequiredFields) - ->removeRequiredFieldsDuplicates + [ + ...paymentMethodTypes.required_fields, + ...creditRequiredFields, + ]->removeRequiredFieldsDuplicates } else if dynamicFieldsEnabledPaymentMethods->Array.includes(paymentMethodType) { paymentMethodTypes.required_fields } else { [] } - }, (paymentMethod, paymentMethodTypes.required_fields, paymentMethodType)) + }, ( + paymentMethod, + paymentMethodTypes.required_fields, + paymentMethodType, + creditPaymentMethodTypes.required_fields, + )) let requiredFields = React.useMemo(() => { requiredFieldsWithBillingDetails->removeBillingDetailsIfUseBillingAddress(billingAddress)