From 797db9f310a8d2743e0dd044817b9b4298073474 Mon Sep 17 00:00:00 2001 From: ArushKapoorJuspay <121166031+ArushKapoorJuspay@users.noreply.github.com> Date: Tue, 28 Nov 2023 16:07:46 +0530 Subject: [PATCH] fix: HS-132: Country fix (#47) --- src/Components/DynamicFields.res | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Components/DynamicFields.res b/src/Components/DynamicFields.res index e730a46f9..f638029b1 100644 --- a/src/Components/DynamicFields.res +++ b/src/Components/DynamicFields.res @@ -319,7 +319,7 @@ let make = ( | BillingName => setFields(setBillingName, billingName, requiredField, true) | Country | AddressCountry(_) => - if value !== "" { + if value !== "" && country === "" { let countryCode = Country.getCountry(paymentMethodType) ->Js.Array2.filter(item => item.isoAlpha2 === value) @@ -328,11 +328,11 @@ let make = ( setCountry(_ => countryCode.countryName) } | Currency(_) => - if value !== "" { + if value !== "" && currency === "" { setCurrency(_ => value) } | Bank => - if value !== "" { + if value !== "" && selectedBank === "" { setSelectedBank(_ => value) } | SpecialField(_)