From d264f32870cdf6d4e8d99e0ed79bf8e73e6129fd Mon Sep 17 00:00:00 2001 From: Vrishab Srivatsa <136090360+vsrivatsa-juspay@users.noreply.github.com> Date: Wed, 13 Mar 2024 17:33:18 +0530 Subject: [PATCH] fix(ideal): bank name not being populated (#227) Co-authored-by: Akash Kamble <127744130+akash-kamble-juspay@users.noreply.github.com> --- src/Utilities/DynamicFieldsUtils.res | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Utilities/DynamicFieldsUtils.res b/src/Utilities/DynamicFieldsUtils.res index fa1e8f47e..c683cb61f 100644 --- a/src/Utilities/DynamicFieldsUtils.res +++ b/src/Utilities/DynamicFieldsUtils.res @@ -420,7 +420,12 @@ let useRequiredFieldsBody = ( | PhoneNumber => phone.value | Currency(_) => currency | Country => country - | Bank => selectedBank + | Bank => + ( + Bank.getBanks(paymentMethodType) + ->Js.Array2.find(item => item.displayName == selectedBank) + ->Belt.Option.getWithDefault(Bank.defaultBank) + ).hyperSwitch | AddressCountry(_) => { let countryCode = Country.getCountry(paymentMethodType) @@ -521,6 +526,7 @@ let useRequiredFieldsBody = ( cardNumber, cardExpiry, cvcNumber, + selectedBank, ]) }