diff --git a/src/hooks/AuthHooks.res b/src/hooks/AuthHooks.res index 61ec1c785..57792db24 100644 --- a/src/hooks/AuthHooks.res +++ b/src/hooks/AuthHooks.res @@ -23,6 +23,8 @@ let getHeaders = (~uri, ~headers, ()) => { let res = switch hyperSwitchToken { | Some(token) => { headers->Dict.set("authorization", `Bearer ${token}`) + headers->Dict.set("api-key", `hyperswitch`) + headers->Dict.set("Content-Type", `application/json`) headers } diff --git a/src/screens/HyperSwitch/Home/CommonConnectorFlow/ConfigureConnector.res b/src/screens/HyperSwitch/Home/CommonConnectorFlow/ConfigureConnector.res index f83651a1b..bdc0fe990 100644 --- a/src/screens/HyperSwitch/Home/CommonConnectorFlow/ConfigureConnector.res +++ b/src/screens/HyperSwitch/Home/CommonConnectorFlow/ConfigureConnector.res @@ -48,6 +48,24 @@ let make = (~connectProcessorValue: connectProcessor) => { } } + React.useEffect1(() => { + if choiceState === #NotSelected { + setButtonState(_ => Button.Disabled) + } else { + setButtonState(_ => Button.Normal) + } + None + }, [choiceState]) + + React.useEffect1(() => { + if smartRoutingChoiceState === #NotSelected { + setButtonState(_ => Button.Disabled) + } else { + setButtonState(_ => Button.Normal) + } + None + }, [smartRoutingChoiceState]) + React.useEffect2(() => { setInitialValues(prevJson => { let prevJsonDict = prevJson->LogicUtils.getDictFromJsonObject @@ -185,6 +203,8 @@ let make = (~connectProcessorValue: connectProcessor) => { listChoices={connectorChoiceArray} nextButton={