From e24bd71faba6b461db957c880660e17eaa0cb097 Mon Sep 17 00:00:00 2001 From: Vrishab Srivatsa Date: Wed, 13 Mar 2024 16:18:19 +0530 Subject: [PATCH] fix(ideal): bank name not being populated --- 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, ]) }