diff --git a/src/screens/HyperSwitch/RoutingRevamp/AdvancedRoutingUIUtils.res b/src/screens/HyperSwitch/RoutingRevamp/AdvancedRoutingUIUtils.res index 31f8ce1d6..cd2436e4f 100644 --- a/src/screens/HyperSwitch/RoutingRevamp/AdvancedRoutingUIUtils.res +++ b/src/screens/HyperSwitch/RoutingRevamp/AdvancedRoutingUIUtils.res @@ -176,7 +176,7 @@ module ValueInp = { } | EQUAL_TO => switch keyType->variantTypeMapper { - | String_value => + | String_value | Metadata_value => | _ => } diff --git a/src/screens/HyperSwitch/RoutingRevamp/Previewers/RulePreviewer.res b/src/screens/HyperSwitch/RoutingRevamp/Previewers/RulePreviewer.res index 7686ad9b7..84e11fef6 100644 --- a/src/screens/HyperSwitch/RoutingRevamp/Previewers/RulePreviewer.res +++ b/src/screens/HyperSwitch/RoutingRevamp/Previewers/RulePreviewer.res @@ -70,6 +70,12 @@ let make = (~ruleInfo: algorithmData, ~isFrom3ds=false) => { | JSONArray(arr) => arr->Js.Array2.joinWith(", ") | JSONString(str) => str | JSONNumber(num) => num->Belt.Float.toString + | JSONObject(obj) => obj->LogicUtils.getString("value", "") + | _ => "" + } + + let metadataKeyValue = switch statement.value.value->Js.Json.classify { + | JSONObject(obj) => obj->LogicUtils.getString("key", "") | _ => "" } @@ -82,6 +88,9 @@ let make = (~ruleInfo: algorithmData, ~isFrom3ds=false) => { /> + + + Belt.Option.isSome}> Belt.Option.getWithDefault("")}