Skip to content

Commit

Permalink
feat: threeDS fix check added for methodkeys
Browse files Browse the repository at this point in the history
  • Loading branch information
Pritish Budhiraja committed Dec 19, 2023
1 parent 2722f99 commit 0cb9675
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/screens/HyperSwitch/RoutingRevamp/AdvancedRoutingUIUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ let metaInput = (id, keyType) =>

module FieldInp = {
@react.component
let make = (~prefix, ~onChangeMethod) => {
let make = (~methodKeys, ~prefix, ~onChangeMethod) => {
let field = ReactFinalForm.useField(`${prefix}.lhs`).input
let op = ReactFinalForm.useField(`${prefix}.comparison`).input
let val = ReactFinalForm.useField(`${prefix}.value.value`).input
Expand Down Expand Up @@ -311,13 +311,16 @@ module FieldInp = {
->Option.getWithDefault(""->Js.Json.string)
->getStringFromJson("")

let generatedSelectBoxOptionType: SelectBox.dropdownOption = {
label: extractValueFromDict("kind"),
value: extractValueFromDict("kind"),
description: extractValueFromDict("description"),
optGroup: ele,
let kindValue = extractValueFromDict("kind")
if methodKeys->Js.Array2.includes(kindValue) {
let generatedSelectBoxOptionType: SelectBox.dropdownOption = {
label: kindValue,
value: kindValue,
description: extractValueFromDict("description"),
optGroup: ele,
}
acc->Js.Array2.push(generatedSelectBoxOptionType)->ignore
}
acc->Js.Array2.push(generatedSelectBoxOptionType)->ignore
},
)
acc
Expand Down Expand Up @@ -391,7 +394,7 @@ module RuleFieldBase = {
</UIUtils.RenderIf>
<div className="-mt-5 p-1">
<FieldWrapper label="">
<FieldInp prefix=id onChangeMethod />
<FieldInp methodKeys prefix=id onChangeMethod />
</FieldWrapper>
</div>
<div className="-mt-5">
Expand Down

0 comments on commit 0cb9675

Please sign in to comment.