diff --git a/src/entryPoints/hyperswitch/WooCommerce/WooCommerce.res b/src/entryPoints/hyperswitch/WooCommerce/WooCommerce.res index c9cb1f07d..d57102057 100644 --- a/src/entryPoints/hyperswitch/WooCommerce/WooCommerce.res +++ b/src/entryPoints/hyperswitch/WooCommerce/WooCommerce.res @@ -247,7 +247,7 @@ let make = () => { try { if forward && !(stepInView->enumToValueMapper(enums)) { let currentStepVariant = stepInView->variantToEnumMapper - let _resp = await Boolean(true)->usePostEnumDetails(currentStepVariant) + let _ = await Boolean(true)->usePostEnumDetails(currentStepVariant) } } catch { | _ => () diff --git a/src/entryPoints/hyperswitch/WooCommerce/WooCommerceUIUtils.res b/src/entryPoints/hyperswitch/WooCommerce/WooCommerceUIUtils.res index a723901a0..84b4a0c03 100644 --- a/src/entryPoints/hyperswitch/WooCommerce/WooCommerceUIUtils.res +++ b/src/entryPoints/hyperswitch/WooCommerce/WooCommerceUIUtils.res @@ -79,16 +79,16 @@ module SelectPaymentMethods = { let enumRecoilUpdateArr = [] if enums.firstProcessorConnected.processorID->Js.String2.length === 0 { - let _fPCResp = await body->postEnumDetails(#FirstProcessorConnected) + let _ = await body->postEnumDetails(#FirstProcessorConnected) enumRecoilUpdateArr->Array.push((body, #FirstProcessorConnected)) } if !enums.isMultipleConfiguration { - let _mCResp = await Boolean(true)->postEnumDetails(#IsMultipleConfiguration) + let _ = await Boolean(true)->postEnumDetails(#IsMultipleConfiguration) enumRecoilUpdateArr->Array.push((Boolean(true), #IsMultipleConfiguration)) } - let _res = updateEnumInRecoil(enumRecoilUpdateArr) + let _ = updateEnumInRecoil(enumRecoilUpdateArr) } catch { | _ => setButtonState(_ => Button.Normal) } diff --git a/src/screens/HyperSwitch/APIUtils/APIUtils.res b/src/screens/HyperSwitch/APIUtils/APIUtils.res index eeb907d2e..40361e3fe 100644 --- a/src/screens/HyperSwitch/APIUtils/APIUtils.res +++ b/src/screens/HyperSwitch/APIUtils/APIUtils.res @@ -256,7 +256,7 @@ let handleLogout = async ( ~setAuthStatus, ) => { let logoutUrl = getURL(~entityName=USERS, ~methodType=Post, ~userType=#SIGNOUT, ()) - let _res = await fetchApi(logoutUrl, ~method_=Fetch.Post, ()) + let _ = await fetchApi(logoutUrl, ~method_=Fetch.Post, ()) setAuthStatus(HyperSwitchAuthTypes.LoggedOut) LocalStorage.clear() RescriptReactRouter.push("/register") @@ -399,7 +399,7 @@ let useGetMethod = (~showErrorToast=true, ()) => { _ => { hyperswitchMixPanel(~eventName=Some(`${urlPath}_tryplayground_register`), ()) hyperswitchMixPanel(~eventName=Some(`global_tryplayground_register`), ()) - let _res = handleLogout(~fetchApi, ~setAuthStatus) + let _ = handleLogout(~fetchApi, ~setAuthStatus) } }, }, @@ -460,7 +460,7 @@ let useUpdateMethod = (~showErrorToast=true, ()) => { _ => { hyperswitchMixPanel(~eventName=Some(`${urlPath}_tryplayground_register`), ()) hyperswitchMixPanel(~eventName=Some(`global_tryplayground_register`), ()) - let _res = handleLogout(~fetchApi, ~setAuthStatus) + let _ = handleLogout(~fetchApi, ~setAuthStatus) } }, }, diff --git a/src/screens/HyperSwitch/Analytics/DownloadReportModal.res b/src/screens/HyperSwitch/Analytics/DownloadReportModal.res index cf8680463..6955e3041 100644 --- a/src/screens/HyperSwitch/Analytics/DownloadReportModal.res +++ b/src/screens/HyperSwitch/Analytics/DownloadReportModal.res @@ -27,7 +27,7 @@ let make = (~reportModal, ~setReportModal, ~entityName) => { let downloadReport = async body => { try { let url = getURL(~entityName, ~methodType=Post, ()) - let _res = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) setReportModal(_ => false) showToast(~message="Email Sent", ~toastType=ToastSuccess, ()) } catch { diff --git a/src/screens/HyperSwitch/Analytics/HomePageOverview/HomePageOverviewComponent.res b/src/screens/HyperSwitch/Analytics/HomePageOverview/HomePageOverviewComponent.res index 03f95e8de..66e65800b 100644 --- a/src/screens/HyperSwitch/Analytics/HomePageOverview/HomePageOverviewComponent.res +++ b/src/screens/HyperSwitch/Analytics/HomePageOverview/HomePageOverviewComponent.res @@ -214,7 +214,7 @@ module OverviewInfo = { let generateSampleData = async () => { try { let generateSampleDataUrl = getURL(~entityName=GENERATE_SAMPLE_DATA, ~methodType=Post, ()) - let _generateSampleData = await updateDetails( + let _ = await updateDetails( generateSampleDataUrl, [("record", 50.0->Js.Json.number)]->Js.Dict.fromArray->Js.Json.object_, Post, diff --git a/src/screens/HyperSwitch/Analytics/SystemMetrics/SystemMetricsAnalytics.res b/src/screens/HyperSwitch/Analytics/SystemMetrics/SystemMetricsAnalytics.res index 73ffee061..da89e0dcb 100644 --- a/src/screens/HyperSwitch/Analytics/SystemMetrics/SystemMetricsAnalytics.res +++ b/src/screens/HyperSwitch/Analytics/SystemMetrics/SystemMetricsAnalytics.res @@ -74,256 +74,6 @@ module APITableInfo = { } } -module ConnectorLatency = { - open DynamicSingleStat - open SystemMetricsAnalyticsUtils - open HSAnalyticsUtils - open AnalyticsTypes - @react.component - let make = () => { - let (_totalVolume, setTotalVolume) = React.useState(_ => 0) - - let getStatData = ( - singleStatData: systemMetricsObjectType, - timeSeriesData: array, - deltaTimestampData: DynamicSingleStat.deltaRange, - colType, - _mode, - ) => { - switch colType { - | Latency | _ => { - title: "Payments Confirm Latency", - tooltipText: "Average time taken for the entire Payments Confirm API call.", - deltaTooltipComponent: AnalyticsUtils.singlestatDeltaTooltipFormat( - singleStatData.latency, - deltaTimestampData.currentSr, - ), - value: singleStatData.latency /. 1000.0, - delta: { - singleStatData.latency - }, - data: constructData("latency", timeSeriesData), - statType: "LatencyMs", - showDelta: false, - } - } - } - - let defaultColumns: array> = [ - { - sectionName: "", - columns: [Latency], - }, - ] - - let singleStatBodyMake = (singleStatBodyEntity: singleStatBodyEntity) => { - let filters = - [ - ("api_name", ["PaymentsConfirm"->Js.Json.string]->Js.Json.array), - ("status_code", [200.0->Js.Json.number]->Js.Json.array), - ("flow_type", ["Payment"->Js.Json.string]->Js.Json.array), - ] - ->Js.Dict.fromArray - ->Js.Json.object_ - - [ - AnalyticsUtils.getFilterRequestBody( - ~filter=filters->Some, - ~metrics=singleStatBodyEntity.metrics, - ~delta=?singleStatBodyEntity.delta, - ~startDateTime=singleStatBodyEntity.startDateTime, - ~endDateTime=singleStatBodyEntity.endDateTime, - ~mode=singleStatBodyEntity.mode, - ~customFilter=?singleStatBodyEntity.customFilter, - ~source=?singleStatBodyEntity.source, - ~granularity=singleStatBodyEntity.granularity, - ~prefix=singleStatBodyEntity.prefix, - (), - )->Js.Json.object_, - ] - ->Js.Json.array - ->Js.Json.stringify - } - - let getStatEntity: 'a => DynamicSingleStat.entityType<'colType, 't, 't2> = metrics => { - urlConfig: [ - { - uri: `${HSwitchGlobalVars.hyperSwitchApiPrefix}/analytics/v1/metrics/${domain}`, - metrics: metrics->getStringListFromArrayDict, - singleStatBody: singleStatBodyMake, - singleStatTimeSeriesBody: singleStatBodyMake, - }, - ], - getObjects: itemToObjMapper, - getTimeSeriesObject: timeSeriesObjMapper, - defaultColumns, - getData: getStatData, - totalVolumeCol: None, - matrixUriMapper: _ => - `${HSwitchGlobalVars.hyperSwitchApiPrefix}/analytics/v1/metrics/${domain}`, - } - - let metrics = [Latency->getStringFromVarient]->Js.Array2.map(key => { - [("name", key->Js.Json.string)]->Js.Dict.fromArray->Js.Json.object_ - }) - - let singleStatEntity = getStatEntity(metrics) - let dateDict = HSwitchRemoteFilter.getDateFilteredObject() - - Js.Array2.map(getStringFromVarient)} - moduleName="SystemMetrics" - defaultStartDate={dateDict.start_time} - defaultEndDate={dateDict.end_time} - setTotalVolume - showPercentage=false - isHomePage=false - statSentiment={singleStatEntity.statSentiment->Belt.Option.getWithDefault(Js.Dict.empty())} - /> - } -} - -module HSiwtchPaymentConfirmLatency = { - open DynamicSingleStat - open SystemMetricsAnalyticsUtils - open Promise - open LogicUtils - @react.component - let make = () => { - let url = `${HSwitchGlobalVars.hyperSwitchApiPrefix}/analytics/v1/metrics/${domain}` - let (isLoading, setIsLoading) = React.useState(_ => true) - let (latency, setLatency) = React.useState(_ => 0) - let (connectorLatency, setConnectorLatency) = React.useState(_ => 0) - let (overallLatency, setOverallrLatency) = React.useState(_ => 0) - let updateDetails = APIUtils.useUpdateMethod() - let dateDict = HSwitchRemoteFilter.getDateFilteredObject() - - let singleStatBodyEntity = { - metrics: ["latency", "api_count", "status_code_count"], - startDateTime: dateDict.start_time, - endDateTime: dateDict.end_time, - } - - let singleStatBodyMake = (singleStatBodyEntity: singleStatBodyEntity, flowType) => { - let filters = - [ - ("api_name", ["PaymentsConfirm"->Js.Json.string]->Js.Json.array), - ("status_code", [200.0->Js.Json.number]->Js.Json.array), - ("flow_type", [flowType->Js.Json.string]->Js.Json.array), - ] - ->Js.Dict.fromArray - ->Js.Json.object_ - - [ - AnalyticsUtils.getFilterRequestBody( - ~filter=filters->Some, - ~metrics=singleStatBodyEntity.metrics, - ~delta=?singleStatBodyEntity.delta, - ~startDateTime=singleStatBodyEntity.startDateTime, - ~endDateTime=singleStatBodyEntity.endDateTime, - ~mode=singleStatBodyEntity.mode, - ~customFilter=?singleStatBodyEntity.customFilter, - ~source=?singleStatBodyEntity.source, - ~granularity=singleStatBodyEntity.granularity, - ~prefix=singleStatBodyEntity.prefix, - (), - )->Js.Json.object_, - ]->Js.Json.array - } - - let parseJson = json => { - json - ->getDictFromJsonObject - ->getJsonObjectFromDict("queryData") - ->getArrayFromJson([]) - ->Belt.Array.get(0) - ->Belt.Option.getWithDefault(Js.Json.object_(Js.Dict.empty())) - ->getDictFromJsonObject - ->getInt("latency", 0) - } - - let getOverallLatency = async () => { - updateDetails(url, singleStatBodyEntity->singleStatBodyMake("Payment"), Fetch.Post) - ->thenResolve(json => { - setOverallrLatency(_ => json->parseJson) - }) - ->catch(_ => { - setIsLoading(_ => false) - resolve() - }) - ->ignore - } - - let getConnectorLatency = () => { - updateDetails(url, singleStatBodyEntity->singleStatBodyMake("OutgoingEvent"), Fetch.Post) - ->thenResolve(json => { - setConnectorLatency(_ => json->parseJson) - setIsLoading(_ => false) - }) - ->catch(_ => { - setIsLoading(_ => false) - resolve() - }) - ->ignore - } - - React.useEffect2(() => { - let value = overallLatency - connectorLatency - setLatency(_ => value) - - None - }, (overallLatency, connectorLatency)) - - React.useEffect0(() => { - getOverallLatency()->ignore - getConnectorLatency()->ignore - - None - }) - - if isLoading { -
- -
- } else { -
-
-
-
-
- {latencyShortNum( - ~labelValue=latency->Belt.Int.toFloat /. 1000.0, - ~includeMilliseconds=true, - (), - ) - ->Js.String2.toLowerCase - ->React.string} -
-
-
-
- {"Hyperswitch overhead for payment confirm"->React.string} -
- - -
} - toolTipPosition=ToolTip.Top - /> -
-
-
- - } - } -} - module SystemMetricsAnalytics = { open AnalyticsTypes open LogicUtils @@ -397,14 +147,6 @@ module SystemMetricsAnalytics = { let filterDataOrig = getFilterData(filterUri, Fetch.Post, filterBody) let filterData = filterDataOrig->Belt.Option.getWithDefault(Js.Json.object_(Js.Dict.empty())) - let _hideFiltersDefaultValue = - filterValue - ->Js.Dict.keys - ->Js.Array2.filter(item => - filteredTabKeys->Js.Array2.find(key => key == item)->Belt.Option.isSome - ) - ->Js.Array2.length < 1 - Js.Dict.entries->Js.Array2.length > 0}> {switch chartEntity1 { | Some(chartEntity) => diff --git a/src/screens/HyperSwitch/Connectors/ConnectorAccountDetails.res b/src/screens/HyperSwitch/Connectors/ConnectorAccountDetails.res index 95b1456ce..ff1fd84f7 100644 --- a/src/screens/HyperSwitch/Connectors/ConnectorAccountDetails.res +++ b/src/screens/HyperSwitch/Connectors/ConnectorAccountDetails.res @@ -406,7 +406,7 @@ let make = ( ~connector=Some(connector), (), ) - let _response = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) setShowVerifyModal(_ => false) onSubmitMain(values)->ignore } catch { diff --git a/src/screens/HyperSwitch/Connectors/ConnectorPreview.res b/src/screens/HyperSwitch/Connectors/ConnectorPreview.res index 2123eeab2..caa7dbc37 100644 --- a/src/screens/HyperSwitch/Connectors/ConnectorPreview.res +++ b/src/screens/HyperSwitch/Connectors/ConnectorPreview.res @@ -257,7 +257,7 @@ let make = ( isConnectorDisabled, ) let url = getURL(~entityName=CONNECTOR, ~methodType=Post, ~id=Some(connectorID), ()) - let _res = await updateDetails(url, disableConnectorPayload->Js.Json.object_, Post) + let _ = await updateDetails(url, disableConnectorPayload->Js.Json.object_, Post) showToast(~message=`Successfully Saved the Changes`, ~toastType=ToastSuccess, ()) RescriptReactRouter.push("/connectors") } catch { diff --git a/src/screens/HyperSwitch/Connectors/Wallets/ApplePayWalletIntegration.res b/src/screens/HyperSwitch/Connectors/Wallets/ApplePayWalletIntegration.res index 5717838cd..b6b7f13bd 100644 --- a/src/screens/HyperSwitch/Connectors/Wallets/ApplePayWalletIntegration.res +++ b/src/screens/HyperSwitch/Connectors/Wallets/ApplePayWalletIntegration.res @@ -91,7 +91,7 @@ module Simplified = { try { let (body, domainName) = values->constructVerifyApplePayReq(connectorID) let verifyAppleUrl = getURL(~entityName=VERIFY_APPLE_PAY, ~methodType=Post, ()) - let _response = await updateAPIHook(`${verifyAppleUrl}/${merchantId}`, body, Post) + let _ = await updateAPIHook(`${verifyAppleUrl}/${merchantId}`, body, Post) let updatedValue = values->constructApplePayMetadata(metadataInputs, #simplified) update(updatedValue) diff --git a/src/screens/HyperSwitch/Developer/APIKeys/KeyManagement.res b/src/screens/HyperSwitch/Developer/APIKeys/KeyManagement.res index 667f31fc1..786f55fa7 100644 --- a/src/screens/HyperSwitch/Developer/APIKeys/KeyManagement.res +++ b/src/screens/HyperSwitch/Developer/APIKeys/KeyManagement.res @@ -105,7 +105,7 @@ module ApiEditModal = { } } - let _res = getAPIKeyDetails() + let _ = getAPIKeyDetails() } catch { | Js.Exn.Error(e) => switch Js.Exn.message(e) { diff --git a/src/screens/HyperSwitch/FraudAndRisk/FRMIntegrationFields.res b/src/screens/HyperSwitch/FraudAndRisk/FRMIntegrationFields.res index ca20884e5..daafdaeb2 100644 --- a/src/screens/HyperSwitch/FraudAndRisk/FRMIntegrationFields.res +++ b/src/screens/HyperSwitch/FraudAndRisk/FRMIntegrationFields.res @@ -276,7 +276,7 @@ let make = ( ->Js.Json.object_ let url = getURL(~entityName=MERCHANT_ACCOUNT, ~methodType=Post, ()) try { - let _res = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) } catch { | _ => () } diff --git a/src/screens/HyperSwitch/FraudAndRisk/FRMSummary.res b/src/screens/HyperSwitch/FraudAndRisk/FRMSummary.res index 25cf6560a..255e5eff6 100644 --- a/src/screens/HyperSwitch/FraudAndRisk/FRMSummary.res +++ b/src/screens/HyperSwitch/FraudAndRisk/FRMSummary.res @@ -79,7 +79,7 @@ let make = (~initialValues, ~currentStep, ~setCurrentStep, ~isUpdateFlow) => { let frmID = initialValues->getDictFromJsonObject->getString("merchant_connector_id", "") let disableFRMPayload = initialValues->FRMTypes.getDisableConnectorPayload(isFRMDisabled) let url = getURL(~entityName=FRAUD_RISK_MANAGEMENT, ~methodType=Post, ~id=Some(frmID), ()) - let _res = await updateDetails(url, disableFRMPayload->Js.Json.object_, Post) + let _ = await updateDetails(url, disableFRMPayload->Js.Json.object_, Post) showToast(~message=`Successfully Saved the Changes`, ~toastType=ToastSuccess, ()) RescriptReactRouter.push("/fraud-risk-management") } catch { diff --git a/src/screens/HyperSwitch/HSMixPanel.res b/src/screens/HyperSwitch/HSMixPanel.res index 3b03952e0..0714c40b6 100644 --- a/src/screens/HyperSwitch/HSMixPanel.res +++ b/src/screens/HyperSwitch/HSMixPanel.res @@ -69,7 +69,7 @@ let useSendEvent = () => { } try { - let _res = await fetchApi( + let _ = await fetchApi( `${dashboardUrl}/mixpanel/track`, ~method_=Fetch.Post, ~bodyStr=`data=${body diff --git a/src/screens/HyperSwitch/Home/CommonConnectorFlow/ConfigureConnector.res b/src/screens/HyperSwitch/Home/CommonConnectorFlow/ConfigureConnector.res index 3fec27740..6dc571cb8 100644 --- a/src/screens/HyperSwitch/Home/CommonConnectorFlow/ConfigureConnector.res +++ b/src/screens/HyperSwitch/Home/CommonConnectorFlow/ConfigureConnector.res @@ -42,7 +42,7 @@ let make = (~connectProcessorValue: connectProcessor) => { routing_id: routingId, } let enumVariant = quickStartPageState->variantToEnumMapper - let _res = await RoutingType(routingVal)->usePostEnumDetails(enumVariant) + let _ = await RoutingType(routingVal)->usePostEnumDetails(enumVariant) setQuickStartPageState(_ => ConnectProcessor(CHECKOUT)) } catch { | Js.Exn.Error(e) => { @@ -78,7 +78,7 @@ let make = (~connectProcessorValue: connectProcessor) => { ~id=Some(activatingId), (), ) - let _res = await updateDetails(activateRuleURL, Js.Dict.empty()->Js.Json.object_, Post) + let _ = await updateDetails(activateRuleURL, Js.Dict.empty()->Js.Json.object_, Post) let _ = await updateEnumForRouting(activatingId) setButtonState(_ => Normal) } catch { @@ -106,7 +106,7 @@ let make = (~connectProcessorValue: connectProcessor) => { let updateEnumForMultipleConfigurationType = async isMultipleConfigSelected => { try { let isMultipleConfigurationType = #IsMultipleConfiguration - let _resp = await ConnectorChoice({ + let _ = await ConnectorChoice({ isMultipleConfiguration: isMultipleConfigSelected, })->usePostEnumDetails(isMultipleConfigurationType) } catch { @@ -145,7 +145,7 @@ let make = (~connectProcessorValue: connectProcessor) => { let paymentBody: paymentType = { payment_id: paymentId, } - let _resp = await PaymentType(paymentBody)->usePostEnumDetails(#TestPayment) + let _ = await PaymentType(paymentBody)->usePostEnumDetails(#TestPayment) setQuickStartPageState(_ => IntegrateApp(LANDING)) RescriptReactRouter.replace("/quick-start") } catch { diff --git a/src/screens/HyperSwitch/Home/CommonConnectorFlow/QuickStartConnectorFlow.res b/src/screens/HyperSwitch/Home/CommonConnectorFlow/QuickStartConnectorFlow.res index dab456d9e..f14bed281 100644 --- a/src/screens/HyperSwitch/Home/CommonConnectorFlow/QuickStartConnectorFlow.res +++ b/src/screens/HyperSwitch/Home/CommonConnectorFlow/QuickStartConnectorFlow.res @@ -59,7 +59,7 @@ let make = ( processorName: connectorResponse->getString("connector_name", ""), } let enumVariant = quickStartPageState->variantToEnumMapper - let _resp = await ProcesorType(processorVal)->usePostEnumDetails(enumVariant) + let _ = await ProcesorType(processorVal)->usePostEnumDetails(enumVariant) setButtonState(_ => Normal) } catch { | _ => diff --git a/src/screens/HyperSwitch/Home/CommonConnectorFlow/SetupConnector.res b/src/screens/HyperSwitch/Home/CommonConnectorFlow/SetupConnector.res index 621364994..088958df1 100644 --- a/src/screens/HyperSwitch/Home/CommonConnectorFlow/SetupConnector.res +++ b/src/screens/HyperSwitch/Home/CommonConnectorFlow/SetupConnector.res @@ -192,7 +192,7 @@ module SelectPaymentMethods = { processorName: connectorResponse->getString("connector_name", ""), } let enumVariant = quickStartPageState->variantToEnumMapper - let _resp = await ProcesorType(processorVal)->usePostEnumDetails(enumVariant) + let _ = await ProcesorType(processorVal)->usePostEnumDetails(enumVariant) } catch { | _ => setButtonState(_ => Button.Normal) } diff --git a/src/screens/HyperSwitch/Home/DelayedVerificationBanner.res b/src/screens/HyperSwitch/Home/DelayedVerificationBanner.res index 6f473d378..18286a98e 100644 --- a/src/screens/HyperSwitch/Home/DelayedVerificationBanner.res +++ b/src/screens/HyperSwitch/Home/DelayedVerificationBanner.res @@ -29,7 +29,7 @@ let make = React.memo((~merchantId="", ~verificationDays) => { let body = email->HyperSwitchAuthUtils.getEmailBody() try { let url = getURL(~entityName=USERS, ~userType=#VERIFY_EMAIL_REQUEST, ~methodType=Post, ()) - let _res = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) showToast(~message=`Email Send Successfully!`, ~toastType=ToastSuccess, ()) } catch { | _ => diff --git a/src/screens/HyperSwitch/Home/HomeUtils.res b/src/screens/HyperSwitch/Home/HomeUtils.res index e87ce358c..4dd88d960 100644 --- a/src/screens/HyperSwitch/Home/HomeUtils.res +++ b/src/screens/HyperSwitch/Home/HomeUtils.res @@ -225,7 +225,7 @@ module CheckoutCard = { _ => { hyperswitchMixPanel(~eventName=Some(`${urlPath}_tryplayground_register`), ()) hyperswitchMixPanel(~eventName=Some(`global_tryplayground_register`), ()) - let _res = APIUtils.handleLogout(~fetchApi, ~setAuthStatus) + let _ = APIUtils.handleLogout(~fetchApi, ~setAuthStatus) } }, }, diff --git a/src/screens/HyperSwitch/Home/HomeV2.res b/src/screens/HyperSwitch/Home/HomeV2.res index aeb99cfba..bc8adecaa 100644 --- a/src/screens/HyperSwitch/Home/HomeV2.res +++ b/src/screens/HyperSwitch/Home/HomeV2.res @@ -124,7 +124,7 @@ module QuickStart = { await ProcesorType(bodyOfSecondConnector)->usePostEnumDetails( #SecondProcessorConnected, ) - let _res = updateEnumInRecoil([ + let _ = updateEnumInRecoil([ (Boolean(true), #IsMultipleConfiguration), (ProcesorType(bodyOfFirstConnector), #FirstProcessorConnected), (ProcesorType(bodyOfSecondConnector), #SecondProcessorConnected), @@ -146,7 +146,7 @@ module QuickStart = { })->usePostEnumDetails(#IsMultipleConfiguration) let _firstEnumSetupValues = await ProcesorType(bodyOfFirstConnector)->usePostEnumDetails(#FirstProcessorConnected) - let _res = updateEnumInRecoil([ + let _ = updateEnumInRecoil([ (ConnectorChoice({isMultipleConfiguration: true}), #IsMultipleConfiguration), (ProcesorType(bodyOfFirstConnector), #FirstProcessorConnected), ]) diff --git a/src/screens/HyperSwitch/Home/ProdIntent/ProdIntentForm.res b/src/screens/HyperSwitch/Home/ProdIntent/ProdIntentForm.res index 5986a19d9..b64d72e77 100644 --- a/src/screens/HyperSwitch/Home/ProdIntent/ProdIntentForm.res +++ b/src/screens/HyperSwitch/Home/ProdIntent/ProdIntentForm.res @@ -26,7 +26,7 @@ let make = (~isFromMilestoneCard=false) => { ~is_done=true, (), ) - let _res = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) setIntegrationDetails(_ => body->ProviderHelper.getIntegrationDetails) } catch { | _ => () diff --git a/src/screens/HyperSwitch/Home/ProdIntent/ProdVerifyModal.res b/src/screens/HyperSwitch/Home/ProdIntent/ProdVerifyModal.res index 16ed4ae98..67e579e02 100644 --- a/src/screens/HyperSwitch/Home/ProdIntent/ProdVerifyModal.res +++ b/src/screens/HyperSwitch/Home/ProdIntent/ProdVerifyModal.res @@ -26,7 +26,7 @@ let make = (~showModal, ~setShowModal, ~initialValues=Js.Dict.empty(), ~getProdV ~is_done=true, (), ) - let _res = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) setIntegrationDetails(_ => body->ProviderHelper.getIntegrationDetails) } catch { | _ => () @@ -37,7 +37,7 @@ let make = (~showModal, ~setShowModal, ~initialValues=Js.Dict.empty(), ~getProdV try { let url = getURL(~entityName=PROD_VERIFY, ~methodType=Fetch.Post, ()) let body = values->getBody->Js.Json.object_ - let _res = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) showToast( ~toastType=ToastSuccess, ~message="Successfully sent for verification!", diff --git a/src/screens/HyperSwitch/Home/QuickStart/GoLive.res b/src/screens/HyperSwitch/Home/QuickStart/GoLive.res index c6edc5763..43b791432 100644 --- a/src/screens/HyperSwitch/Home/QuickStart/GoLive.res +++ b/src/screens/HyperSwitch/Home/QuickStart/GoLive.res @@ -52,7 +52,7 @@ let make = (~goLive) => { ~is_done=true, (), ) - let _res = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) setIntegrationDetails(_ => body->ProviderHelper.getIntegrationDetails) setQuickStartPageState(_ => FinalLandingPage) } catch { @@ -83,7 +83,7 @@ let make = (~goLive) => { try { let url = getURL(~entityName=PROD_VERIFY, ~methodType=Fetch.Post, ()) let body = values->getBody->Js.Json.object_ - let _res = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) getProdVerifyDetails()->ignore markAsDone()->ignore } catch { diff --git a/src/screens/HyperSwitch/Home/QuickStart/IntegrateYourApp/IntegrateYourAppLanding.res b/src/screens/HyperSwitch/Home/QuickStart/IntegrateYourApp/IntegrateYourAppLanding.res index 72e1826c9..2f44fb0bc 100644 --- a/src/screens/HyperSwitch/Home/QuickStart/IntegrateYourApp/IntegrateYourAppLanding.res +++ b/src/screens/HyperSwitch/Home/QuickStart/IntegrateYourApp/IntegrateYourAppLanding.res @@ -42,7 +42,7 @@ let make = (~integrateAppValue: integrateApp) => { integration_type: (choiceState: QuickStartTypes.choiceStateTypes :> string), } let enumVariant = quickStartPageState->variantToEnumMapper - let _resp = await IntegrationMethod(integartionValue)->usePostEnumDetails(enumVariant) + let _ = await IntegrationMethod(integartionValue)->usePostEnumDetails(enumVariant) setQuickStartPageState(_ => IntegrateApp(CUSTOM_INTEGRATION)) setButtonState(_ => Normal) } catch { @@ -53,7 +53,7 @@ let make = (~integrateAppValue: integrateApp) => { let handleMarkAsDone = async () => { try { let enumVariant = quickStartPageState->variantToEnumMapper - let _resp = await Boolean(true)->usePostEnumDetails(enumVariant) + let _ = await Boolean(true)->usePostEnumDetails(enumVariant) } catch { | _ => () } diff --git a/src/screens/HyperSwitch/Home/QuickStart/IntegrateYourApp/IntegrationDocsPage.res b/src/screens/HyperSwitch/Home/QuickStart/IntegrateYourApp/IntegrationDocsPage.res index 07b1b52ce..99711f4d3 100644 --- a/src/screens/HyperSwitch/Home/QuickStart/IntegrateYourApp/IntegrationDocsPage.res +++ b/src/screens/HyperSwitch/Home/QuickStart/IntegrateYourApp/IntegrationDocsPage.res @@ -23,7 +23,7 @@ module RequestPage = { ->HSwitchUtils.getBodyForFeedBack() ->Js.Json.object_ - let _res = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) showToast( ~toastType=ToastSuccess, ~message="Request submitted successfully!", diff --git a/src/screens/HyperSwitch/Hooks/EnumVariantHook.res b/src/screens/HyperSwitch/Hooks/EnumVariantHook.res index 394d3d26d..ae31a0902 100644 --- a/src/screens/HyperSwitch/Hooks/EnumVariantHook.res +++ b/src/screens/HyperSwitch/Hooks/EnumVariantHook.res @@ -67,7 +67,7 @@ let usePostEnumDetails = () => { try { let url = getURL(~entityName=USERS, ~userType=#MERCHANT_DATA, ~methodType=Post, ()) let bodyValForApi = enumVariant->QuickStartUtils.generateBodyBasedOnType(body) - let _response = await updateDetails(url, bodyValForApi, Post) + let _ = await updateDetails(url, bodyValForApi, Post) let updatedRecoilValueDict = updateEnumInRecoil([(body, enumVariant)]) Js.Nullable.return(updatedRecoilValueDict) diff --git a/src/screens/HyperSwitch/Order/ShowOrder.res b/src/screens/HyperSwitch/Order/ShowOrder.res index 6740bca8d..e11e8ab91 100644 --- a/src/screens/HyperSwitch/Order/ShowOrder.res +++ b/src/screens/HyperSwitch/Order/ShowOrder.res @@ -689,7 +689,7 @@ let make = (~id) => { ~queryParamerters=Some("force_sync=true"), (), ) - let _res = await fetchDetails(getRefreshStatusUrl) + let _ = await fetchDetails(getRefreshStatusUrl) showToast(~message="Details Updated", ~toastType=ToastSuccess, ()) refetch() } catch { diff --git a/src/screens/HyperSwitch/Recon/Recon.res b/src/screens/HyperSwitch/Recon/Recon.res index ff93d36c5..4fc63a9f7 100644 --- a/src/screens/HyperSwitch/Recon/Recon.res +++ b/src/screens/HyperSwitch/Recon/Recon.res @@ -16,7 +16,7 @@ let make = () => { let onClickForReconRequest = async () => { try { let url = getURL(~entityName=RECON, ~reconType=#REQUEST, ~methodType=Get, ()) - let _res = await updateDetails(url, Js.Json.null, Post) + let _ = await updateDetails(url, Js.Json.null, Post) let _merchantDetails = await fetchMerchantAccountDetails() showToast( ~message=`Thank you for your interest in our reconciliation module. We are currently reviewing your request for access. We will follow up with you soon regarding next steps.`, diff --git a/src/screens/HyperSwitch/Routing/ActiveRouting.res b/src/screens/HyperSwitch/Routing/ActiveRouting.res index 4d072496d..d451a489a 100644 --- a/src/screens/HyperSwitch/Routing/ActiveRouting.res +++ b/src/screens/HyperSwitch/Routing/ActiveRouting.res @@ -45,7 +45,7 @@ module ActionButtons = { let body = requestBody->HSwitchUtils.getBodyForFeedBack() let feedbackUrl = APIUtils.getURL(~entityName=FEEDBACK, ~methodType=Post, ()) - let _res = await updateDetails(feedbackUrl, body->Js.Json.object_, Post) + let _ = await updateDetails(feedbackUrl, body->Js.Json.object_, Post) showToast( ~toastType=ToastSuccess, ~message="Request submitted successfully!", diff --git a/src/screens/HyperSwitch/Routing/PriorityRouting.res b/src/screens/HyperSwitch/Routing/PriorityRouting.res index ef7e572da..5d1a2d0d9 100644 --- a/src/screens/HyperSwitch/Routing/PriorityRouting.res +++ b/src/screens/HyperSwitch/Routing/PriorityRouting.res @@ -36,7 +36,7 @@ module SimpleRoutingView = { let activateRuleURL = getURL(~entityName=ROUTING, ~methodType=Post, ~id=None, ()) - let _res = await updateDetails( + let _ = await updateDetails( activateRuleURL, getRoutingPayload( data, @@ -65,7 +65,7 @@ module SimpleRoutingView = { try { setScreenState(_ => Loading) let activateRuleURL = getURL(~entityName=ROUTING, ~methodType=Post, ~id=routingId, ()) - let _res = await updateDetails(activateRuleURL, Js.Dict.empty()->Js.Json.object_, Post) + let _ = await updateDetails(activateRuleURL, Js.Dict.empty()->Js.Json.object_, Post) showToast( ~message="Successfully Activated Selected Configuration !", ~toastType=ToastState.ToastSuccess, diff --git a/src/screens/HyperSwitch/Routing/RoutingUtils.res b/src/screens/HyperSwitch/Routing/RoutingUtils.res index 6c111366c..a79c99991 100644 --- a/src/screens/HyperSwitch/Routing/RoutingUtils.res +++ b/src/screens/HyperSwitch/Routing/RoutingUtils.res @@ -623,7 +623,7 @@ module SaveAndActivateButton = { onSubmitResponse->Js.Nullable.toOption->Belt.Option.getWithDefault(Js.Json.null) let currentActivatedId = currentActivatedFromJson->LogicUtils.getDictFromJsonObject->LogicUtils.getString("id", "") - let _response = await handleActivateConfiguration(Some(currentActivatedId)) + let _ = await handleActivateConfiguration(Some(currentActivatedId)) } catch { | Js.Exn.Error(e) => let _err = diff --git a/src/screens/HyperSwitch/Routing/VolumeSplitRouting.res b/src/screens/HyperSwitch/Routing/VolumeSplitRouting.res index fb62618f0..46c8ec908 100644 --- a/src/screens/HyperSwitch/Routing/VolumeSplitRouting.res +++ b/src/screens/HyperSwitch/Routing/VolumeSplitRouting.res @@ -142,7 +142,7 @@ module VolumeRoutingView = { try { setScreenState(_ => Loading) let activateRuleURL = getURL(~entityName=ROUTING, ~methodType=Post, ~id=activatingId, ()) - let _res = await updateDetails(activateRuleURL, Js.Dict.empty()->Js.Json.object_, Post) + let _ = await updateDetails(activateRuleURL, Js.Dict.empty()->Js.Json.object_, Post) showToast(~message="Successfully Activated !", ~toastType=ToastState.ToastSuccess, ()) RescriptReactRouter.replace(`/routing?`) setScreenState(_ => Success) @@ -172,7 +172,7 @@ module VolumeRoutingView = { setScreenState(_ => Loading) let deactivateRoutingURL = `${getURL(~entityName=ROUTING, ~methodType=Post, ())}/deactivate` let body = [("profile_id", profile->Js.Json.string)]->Js.Dict.fromArray->Js.Json.object_ - let _res = await updateDetails(deactivateRoutingURL, body, Post) + let _ = await updateDetails(deactivateRoutingURL, body, Post) showToast(~message="Successfully Deactivated !", ~toastType=ToastState.ToastSuccess, ()) RescriptReactRouter.replace(`/routing?`) setScreenState(_ => Success) diff --git a/src/screens/HyperSwitch/RoutingRevamp/AdvancedRouting.res b/src/screens/HyperSwitch/RoutingRevamp/AdvancedRouting.res index b147f8b23..0f2675053 100644 --- a/src/screens/HyperSwitch/RoutingRevamp/AdvancedRouting.res +++ b/src/screens/HyperSwitch/RoutingRevamp/AdvancedRouting.res @@ -499,7 +499,7 @@ let make = (~routingRuleId, ~isActive, ~setCurrentRouting) => { try { setScreenState(_ => Loading) let activateRuleURL = getURL(~entityName=ROUTING, ~methodType=Post, ~id=activatingId, ()) - let _res = await updateDetails(activateRuleURL, Js.Dict.empty()->Js.Json.object_, Post) + let _ = await updateDetails(activateRuleURL, Js.Dict.empty()->Js.Json.object_, Post) showToast(~message="Successfully Activated !", ~toastType=ToastState.ToastSuccess, ()) RescriptReactRouter.replace(`/routing?`) setScreenState(_ => Success) @@ -528,7 +528,7 @@ let make = (~routingRuleId, ~isActive, ~setCurrentRouting) => { setScreenState(_ => Loading) let deactivateRoutingURL = `${getURL(~entityName=ROUTING, ~methodType=Post, ())}/deactivate` let body = [("profile_id", profile->Js.Json.string)]->Js.Dict.fromArray->Js.Json.object_ - let _res = await updateDetails(deactivateRoutingURL, body, Post) + let _ = await updateDetails(deactivateRoutingURL, body, Post) showToast(~message="Successfully Deactivated !", ~toastType=ToastState.ToastSuccess, ()) RescriptReactRouter.replace(`/routing?`) setScreenState(_ => Success) diff --git a/src/screens/HyperSwitch/SDKPayment/TestPayment.res b/src/screens/HyperSwitch/SDKPayment/TestPayment.res index 0c5b7fd42..c0e79833c 100644 --- a/src/screens/HyperSwitch/SDKPayment/TestPayment.res +++ b/src/screens/HyperSwitch/SDKPayment/TestPayment.res @@ -1,8 +1,4 @@ external toJson: 'a => Js.Json.t = "%identity" -let headerTextStyle = "text-xl font-semibold text-grey-700" -let subTextStyle = "text-base font-normal text-grey-700 opacity-50" -let dividerColor = "bg-grey-700 bg-opacity-20 h-px w-full" -let highlightedText = "text-base font-normal text-blue-700 underline" @react.component let make = ( diff --git a/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/HSwitchAgreementScreen.res b/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/HSwitchAgreementScreen.res index 2d5561985..4ba8eb111 100644 --- a/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/HSwitchAgreementScreen.res +++ b/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/HSwitchAgreementScreen.res @@ -17,7 +17,7 @@ let make = () => { try { let agreementUrl = getURL(~entityName=USERS, ~userType=#MERCHANT_DATA, ~methodType=Post, ()) let body = ProdOnboardingUtils.getProdApiBody(~parentVariant=#ProductionAgreement, ()) - let _response = await updateDetails(agreementUrl, body, Post) + let _ = await updateDetails(agreementUrl, body, Post) setDashboardPageState(_ => #PROD_ONBOARDING) } catch { | _ => diff --git a/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/LiveEndpointsSetup.res b/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/LiveEndpointsSetup.res index 5103bbb28..dcead4854 100644 --- a/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/LiveEndpointsSetup.res +++ b/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/LiveEndpointsSetup.res @@ -170,7 +170,7 @@ let make = (~pageView, ~setPageView, ~previewState: option pageView->ProdOnboardingUtils.getPageView) showToast(~message=`Details updated`, ~toastType=ToastState.ToastSuccess, ()) setButtonState(_ => Normal) diff --git a/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/ProdOnboardingLanding.res b/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/ProdOnboardingLanding.res index 10530cc20..5cb5682fa 100644 --- a/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/ProdOnboardingLanding.res +++ b/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/ProdOnboardingLanding.res @@ -244,7 +244,7 @@ let make = () => { setButtonState(_ => Loading) let url = getURL(~entityName=USERS, ~userType=#MERCHANT_DATA, ~methodType=Post, ()) let body = ProdOnboardingUtils.getProdApiBody(~parentVariant=#SetupComplete, ()) - let _response = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) setButtonState(_ => Normal) setDashboardPageState(_ => #HOME) } catch { diff --git a/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/ProdOnboardingUIUtils.res b/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/ProdOnboardingUIUtils.res index 5728292af..d5850134e 100644 --- a/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/ProdOnboardingUIUtils.res +++ b/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/ProdOnboardingUIUtils.res @@ -1,5 +1,4 @@ let subTextStyle = "text-base font-normal text-grey-700 opacity-50" -let highlightedText = "text-base font-normal text-blue-700 underline" let headerTextStyle = "text-xl font-semibold text-grey-700" module WarningBlock = { @@ -16,16 +15,6 @@ module WarningBlock = { } } -module NoteBlock = { - @react.component - let make = (~noteText) => { -
- -

{noteText->React.string}

-
- } -} module ModalChildElementsForSpecificConnector = { @react.component diff --git a/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/SetupConnectorCredentials.res b/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/SetupConnectorCredentials.res index 8779bcedf..8aa90ace6 100644 --- a/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/SetupConnectorCredentials.res +++ b/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/SetupConnectorCredentials.res @@ -133,7 +133,7 @@ let make = (~selectedConnector, ~pageView, ~setPageView, ~setConnectorID) => { ~connectorId, (), ) - let _response = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) setPageView(_ => pageView->ProdOnboardingUtils.getPageView) } catch { | _ => () @@ -243,7 +243,7 @@ let make = (~selectedConnector, ~pageView, ~setPageView, ~setConnectorID) => { )->ignoreFields(connectorID, verifyConnectorIgnoreField) let url = getURL(~entityName=CONNECTOR, ~methodType=Post, ~connector=Some(connectorName), ()) - let _response = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) setShowVerifyModal(_ => false) onSubmitMain(values)->ignore setIsLoading(_ => false) diff --git a/src/screens/HyperSwitch/SelfServe/HSwitchSandboxOnboarding/UserOnboarding.res b/src/screens/HyperSwitch/SelfServe/HSwitchSandboxOnboarding/UserOnboarding.res index b1207806f..2fc90fb0a 100644 --- a/src/screens/HyperSwitch/SelfServe/HSwitchSandboxOnboarding/UserOnboarding.res +++ b/src/screens/HyperSwitch/SelfServe/HSwitchSandboxOnboarding/UserOnboarding.res @@ -120,7 +120,7 @@ let make = () => { ~metadata=metaDataDict, (), ) - let _res = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) setIntegrationDetails(_ => body->ProviderHelper.getIntegrationDetails) } catch { | _ => () @@ -146,7 +146,7 @@ let make = () => { ->Js.Json.object_, (), ) - let _res = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) setIntegrationDetails(_ => body->ProviderHelper.getIntegrationDetails) setDashboardPageState(_ => #HOME) } catch { diff --git a/src/screens/HyperSwitch/SelfServe/HSwitchSandboxOnboarding/UserOnboardingUIUtils.res b/src/screens/HyperSwitch/SelfServe/HSwitchSandboxOnboarding/UserOnboardingUIUtils.res index 8724636b1..0df35c684 100644 --- a/src/screens/HyperSwitch/SelfServe/HSwitchSandboxOnboarding/UserOnboardingUIUtils.res +++ b/src/screens/HyperSwitch/SelfServe/HSwitchSandboxOnboarding/UserOnboardingUIUtils.res @@ -507,7 +507,7 @@ module LandingPageTileForIntegrateDocs = { ~metadata=metaDataDict, (), ) - let _res = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) setIntegrationDetails(_ => body->ProviderHelper.getIntegrationDetails) } catch { | _ => () @@ -1028,7 +1028,7 @@ let getTabsForIntegration = ( ~metadata=metaDataDict, (), ) - let _res = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) setIntegrationDetails(_ => body->ProviderHelper.getIntegrationDetails) } catch { | _ => () diff --git a/src/screens/HyperSwitch/Settings/BusinessMapping/BusinessProfile.res b/src/screens/HyperSwitch/Settings/BusinessMapping/BusinessProfile.res index 49e03db00..c55e5d4d1 100644 --- a/src/screens/HyperSwitch/Settings/BusinessMapping/BusinessProfile.res +++ b/src/screens/HyperSwitch/Settings/BusinessMapping/BusinessProfile.res @@ -90,7 +90,7 @@ let make = ( try { setScreenState(_ => PageLoaderWrapper.Loading) let url = getURL(~entityName=BUSINESS_PROFILE, ~methodType=Post, ()) - let _res = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) fetchBusinessProfiles()->ignore showToast(~message="Your Entry added successfully", ~toastType=ToastState.ToastSuccess, ()) if !isFromSettings { diff --git a/src/screens/HyperSwitch/Settings/HSwitchProfileSettings.res b/src/screens/HyperSwitch/Settings/HSwitchProfileSettings.res index 40478cbdf..2569fc1e0 100644 --- a/src/screens/HyperSwitch/Settings/HSwitchProfileSettings.res +++ b/src/screens/HyperSwitch/Settings/HSwitchProfileSettings.res @@ -73,7 +73,7 @@ module ResetPassword = { setIsLoading(_ => true) try { let url = getURL(~entityName=USERS, ~userType=#FORGOT_PASSWORD, ~methodType=Post, ()) - let _res = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) showToast(~message="Please check your registered e-mail", ~toastType=ToastSuccess, ()) setIsLoading(_ => false) } catch { diff --git a/src/screens/HyperSwitch/SetupAccount/HSwitchSetupAccount.res b/src/screens/HyperSwitch/SetupAccount/HSwitchSetupAccount.res index 1365c964f..de0b78a6f 100644 --- a/src/screens/HyperSwitch/SetupAccount/HSwitchSetupAccount.res +++ b/src/screens/HyperSwitch/SetupAccount/HSwitchSetupAccount.res @@ -77,7 +77,7 @@ let make = () => { ->getDictFromJsonObject ->getOptionString("id") let activateRuleURL = getURL(~entityName=ROUTING, ~methodType=Post, ~id=activatingId, ()) - let _res = await updateDetails(activateRuleURL, Js.Dict.empty()->Js.Json.object_, Post) + let _ = await updateDetails(activateRuleURL, Js.Dict.empty()->Js.Json.object_, Post) setStepCounter(_ => #ROUTING_ENABLED) // *GENERATE_SAMPLE_DATA @@ -100,7 +100,7 @@ let make = () => { (), ) let integrationUrl = getURL(~entityName=INTEGRATION_DETAILS, ~methodType=Post, ()) - let _res = await updateDetails(integrationUrl, body, Post) + let _ = await updateDetails(integrationUrl, body, Post) setIntegrationDetails(_ => body->ProviderHelper.getIntegrationDetails) setDashboardPageState(_ => #INTEGRATION_DOC) } catch { diff --git a/src/screens/HyperSwitch/StripePlusPaypal/StripePlusPaypalUIUtils.res b/src/screens/HyperSwitch/StripePlusPaypal/StripePlusPaypalUIUtils.res index 99a79cc1a..b75713c14 100644 --- a/src/screens/HyperSwitch/StripePlusPaypal/StripePlusPaypalUIUtils.res +++ b/src/screens/HyperSwitch/StripePlusPaypal/StripePlusPaypalUIUtils.res @@ -41,10 +41,10 @@ module SelectPaymentMethods = { let enumRecoilUpdateArr = [] if enums.firstProcessorConnected.processorID->Js.String2.length === 0 { - let _resp = await body->postEnumDetails(#FirstProcessorConnected) + let _ = await body->postEnumDetails(#FirstProcessorConnected) enumRecoilUpdateArr->Array.push((body, #FirstProcessorConnected)) } else if enums.secondProcessorConnected.processorID->Js.String2.length === 0 { - let _resp = await body->postEnumDetails(#SecondProcessorConnected) + let _ = await body->postEnumDetails(#SecondProcessorConnected) enumRecoilUpdateArr->Array.push((body, #SecondProcessorConnected)) } @@ -53,7 +53,7 @@ module SelectPaymentMethods = { } else if selectedConnector === PAYPAL { enumRecoilUpdateArr->Array.push((body, #PaypalConnected)) } - let _res = updateEnumInRecoil(enumRecoilUpdateArr) + let _ = updateEnumInRecoil(enumRecoilUpdateArr) } catch { | _ => setButtonState(_ => Button.Normal) } @@ -145,7 +145,7 @@ module TestPayment = { let updateTestPaymentEnum = async _ => { try { - let _resp = await Boolean(true)->postEnumDetails(#SPTestPayment) + let _ = await Boolean(true)->postEnumDetails(#SPTestPayment) } catch { | _ => () } diff --git a/src/screens/HyperSwitch/SwitchMerchant/SwitchMerchant.res b/src/screens/HyperSwitch/SwitchMerchant/SwitchMerchant.res index 1e5d74966..c513079d5 100644 --- a/src/screens/HyperSwitch/SwitchMerchant/SwitchMerchant.res +++ b/src/screens/HyperSwitch/SwitchMerchant/SwitchMerchant.res @@ -9,8 +9,8 @@ module NewAccountCreationModal = { try { let url = getURL(~entityName=USERS, ~userType=#CREATE_MERCHANT, ~methodType=Fetch.Post, ()) let body = values - let _res = await updateDetails(url, body, Post) - let _merchantIds = await fetchMerchantIDs() + let _ = await updateDetails(url, body, Post) + let _ = await fetchMerchantIDs() showToast( ~toastType=ToastSuccess, ~message="Account Created Successfully!", diff --git a/src/screens/HyperSwitch/ThreeDSFlow/HSwitchThreeDS.res b/src/screens/HyperSwitch/ThreeDSFlow/HSwitchThreeDS.res index 50da84b8b..35814ca2c 100644 --- a/src/screens/HyperSwitch/ThreeDSFlow/HSwitchThreeDS.res +++ b/src/screens/HyperSwitch/ThreeDSFlow/HSwitchThreeDS.res @@ -185,7 +185,7 @@ let make = () => { let threeDsPayload = values->buildThreeDsPayloadBody let getActivateUrl = getURL(~entityName=THREE_DS, ~methodType=Put, ()) - let _response = await updateDetails(getActivateUrl, threeDsPayload->toJson, Put) + let _ = await updateDetails(getActivateUrl, threeDsPayload->toJson, Put) fetchDetails()->ignore setShowWarning(_ => true) RescriptReactRouter.replace(`/3ds`) diff --git a/src/screens/HyperSwitch/UserManagement/HSwitchInviteUsers.res b/src/screens/HyperSwitch/UserManagement/HSwitchInviteUsers.res index f062c3305..181e61925 100644 --- a/src/screens/HyperSwitch/UserManagement/HSwitchInviteUsers.res +++ b/src/screens/HyperSwitch/UserManagement/HSwitchInviteUsers.res @@ -88,7 +88,7 @@ let make = () => { let inviteUserReq = async (body, index) => { try { let url = getURL(~entityName=USERS, ~userType=#INVITE, ~methodType=Post, ()) - let _res = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) if index === 0 { showToast(~message=`Invite(s) sent successfully via Email`, ~toastType=ToastSuccess, ()) } @@ -112,7 +112,7 @@ let make = () => { ] ->Js.Dict.fromArray ->Js.Json.object_ - let _res = inviteUserReq(body, index) + let _ = inviteUserReq(body, index) }) await HyperSwitchUtils.delay(400) RescriptReactRouter.push("/users") diff --git a/src/screens/HyperSwitch/UserManagement/HSwitchShowUserData.res b/src/screens/HyperSwitch/UserManagement/HSwitchShowUserData.res index 521a96fb6..d79fdacae 100644 --- a/src/screens/HyperSwitch/UserManagement/HSwitchShowUserData.res +++ b/src/screens/HyperSwitch/UserManagement/HSwitchShowUserData.res @@ -16,7 +16,7 @@ module UserHeading = { try { let url = getURL(~entityName=USERS, ~userType=#RESEND_INVITE, ~methodType=Post, ()) let body = [("user_id", userId->Js.Json.string)]->Js.Dict.fromArray->Js.Json.object_ - let _res = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) showToast(~message=`Invite resend. Please check your email.`, ~toastType=ToastSuccess, ()) } catch { | _ => () diff --git a/src/screens/HyperSwitch/Utils/HSwitchVerticalStepper.res b/src/screens/HyperSwitch/Utils/HSwitchVerticalStepper.res deleted file mode 100644 index f560072f3..000000000 --- a/src/screens/HyperSwitch/Utils/HSwitchVerticalStepper.res +++ /dev/null @@ -1,143 +0,0 @@ -type stepperValueType = { - collapsedText: string, - renderComponent: React.element, - isSelectable: bool, -} - -module StepperRenderedComponent = { - @react.component - let make = ( - ~headerText=None, - ~overrideStyles="", - ~btnText="", - ~isBtnVisible=true, - ~customOnClick=() => (), - ~isDisabled=false, - ~customHeaderComponent=React.null, - ) => { - let stepCompHeight = isBtnVisible ? "h-25" : "h-15" -
- Belt.Option.isSome}> -

- {headerText->Belt.Option.getWithDefault("")->React.string} -

-
- - {customHeaderComponent} - -
- } -} - -let getMixpanelEvent = ( - url: RescriptReactRouter.url, - ~actionName, - ~hyperswitchMixPanel: HSMixPanel.functionType, -) => { - [url.path->LogicUtils.getListHead, "global"]->Js.Array2.forEach(ele => - hyperswitchMixPanel(~pageName=ele, ~contextName="onboarding_checklist", ~actionName, ()) - ) -} - -let skipAndContinue = async ( - ~updateDetails: (Js.String2.t, Js.Json.t, Fetch.requestMethod) => promise, - ~body, - ~setIntegrationDetails, -) => { - try { - let url = APIUtils.getURL(~entityName=INTEGRATION_DETAILS, ~methodType=Post, ()) - let _res = await updateDetails(url, body, Post) - setIntegrationDetails(_ => body->ProviderHelper.getIntegrationDetails) - } catch { - | _ => () - } -} - -let getStepperValue = (~integrationDetails: ProviderTypes.integrationDetailsType) => { - [ - { - collapsedText: "Free tier activated", - renderComponent: - {"10K free transactions per month. Explore detailed pricing"->React.string} - - {"here"->React.string} - -

} - isBtnVisible=false - />, - isSelectable: false, - }, - { - collapsedText: "Dashboard configured", - renderComponent: , - isSelectable: false, - }, - { - collapsedText: "Integrate Hyperswitch", - renderComponent: , - isSelectable: true, - }, - ] -} - -module VerticalStepper = { - @react.component - let make = (~onboardingStep, ~stepperValue) => { - let selectedStepTextStyle = index => - index === onboardingStep - ? "text-blue-800 font-bold" - : "text-jp-gray-banner_black font-semibold" - - let selectedStepStyle = index => - index < onboardingStep ? "bg-blue-800 " : " bg-jp-gray-700 opacity-50" - - let selectedIcon = index => { - index < onboardingStep ? : - } - -
- {stepperValue - ->Array.mapWithIndex((value, index) => { - let isLast = stepperValue->Js.Array2.length - 1 === index -
-
-
{index->selectedIcon}
- - {if onboardingStep === index { -
-
selectedStepStyle}`} /> -
-
- } else { -
selectedStepStyle} `} /> - }} - -
-
string_of_int} className="flex flex-col gap-3"> -
string_of_int} className={`text-xl ${index->selectedStepTextStyle}`}> - {value.collapsedText->React.string} -
- {value.renderComponent} -
-
- }) - ->React.array} -
- } -} diff --git a/src/screens/login/HSwitchLoginFlow/HyperSwitchAuth.res b/src/screens/login/HSwitchLoginFlow/HyperSwitchAuth.res index a706cb5f0..8383b02b9 100644 --- a/src/screens/login/HSwitchLoginFlow/HyperSwitchAuth.res +++ b/src/screens/login/HSwitchLoginFlow/HyperSwitchAuth.res @@ -82,7 +82,7 @@ let make = (~setAuthStatus: HyperSwitchAuthTypes.authStatus => unit, ~authType, let setResetPassword = async body => { try { let url = getURL(~entityName=USERS, ~userType=#RESET_PASSWORD, ~methodType=Post, ()) - let _res = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) RescriptReactRouter.push("/") showToast(~message=`Password Changed Successfully`, ~toastType=ToastSuccess, ()) setAuthType(_ => LoginWithEmail) @@ -96,7 +96,7 @@ let make = (~setAuthStatus: HyperSwitchAuthTypes.authStatus => unit, ~authType, let setForgetPassword = async body => { try { let url = getURL(~entityName=USERS, ~userType=#FORGOT_PASSWORD, ~methodType=Post, ()) - let _res = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) setAuthType(_ => ForgetPasswordEmailSent) showToast(~message="Please check your registered e-mail", ~toastType=ToastSuccess, ()) } catch { @@ -108,7 +108,7 @@ let make = (~setAuthStatus: HyperSwitchAuthTypes.authStatus => unit, ~authType, let resendVerifyEmail = async body => { try { let url = getURL(~entityName=USERS, ~userType=#VERIFY_EMAIL_REQUEST, ~methodType=Post, ()) - let _res = await updateDetails(url, body, Post) + let _ = await updateDetails(url, body, Post) setAuthType(_ => ResendVerifyEmailSent) showToast(~message="Please check your registered e-mail", ~toastType=ToastSuccess, ()) } catch {