Skip to content

Commit

Permalink
fix: HS-132: Country fix (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArushKapoorJuspay authored Nov 28, 2023
1 parent 82626fe commit 797db9f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Components/DynamicFields.res
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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(_)
Expand Down

0 comments on commit 797db9f

Please sign in to comment.