From f2caad8c370b05c659a3ab5b9b957c7ded9b11ae Mon Sep 17 00:00:00 2001 From: Sagar Naik Date: Fri, 8 Dec 2023 16:19:19 +0530 Subject: [PATCH] chore: code refactor --- config/FeatureFlag.json | 3 +-- src/entryPoints/hyperswitch/FeatureFlagUtils.res | 2 -- .../Analytics/PaymentsAnalytics/PaymentAnalytics.res | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/config/FeatureFlag.json b/config/FeatureFlag.json index 6964aeac4..9d6e08029 100644 --- a/config/FeatureFlag.json +++ b/config/FeatureFlag.json @@ -19,6 +19,5 @@ "business_profile": false, "generate_report": false, "forgot_password": false, - "oss_build": true, - "connector_success_rate": true + "oss_build": true } diff --git a/src/entryPoints/hyperswitch/FeatureFlagUtils.res b/src/entryPoints/hyperswitch/FeatureFlagUtils.res index 1f637d3b8..cbc3b2dd4 100644 --- a/src/entryPoints/hyperswitch/FeatureFlagUtils.res +++ b/src/entryPoints/hyperswitch/FeatureFlagUtils.res @@ -21,7 +21,6 @@ type featureFlag = { verifyConnector: bool, forgetPassword: bool, ossBuild: bool, - connector_success_rate: bool, } let featureFlagType = (featureFlags: Js.Json.t) => { @@ -50,7 +49,6 @@ let featureFlagType = (featureFlags: Js.Json.t) => { verifyConnector: dict->getBool("verify_connector", false), forgetPassword: dict->getBool("forgot_password", false), ossBuild: dict->getBool("oss_build", false), - connector_success_rate: dict->getBool("connector_success_rate", false), } typedFeatureFlag } diff --git a/src/screens/HyperSwitch/Analytics/PaymentsAnalytics/PaymentAnalytics.res b/src/screens/HyperSwitch/Analytics/PaymentsAnalytics/PaymentAnalytics.res index 32e962906..b6745796c 100644 --- a/src/screens/HyperSwitch/Analytics/PaymentsAnalytics/PaymentAnalytics.res +++ b/src/screens/HyperSwitch/Analytics/PaymentsAnalytics/PaymentAnalytics.res @@ -8,7 +8,7 @@ let make = () => { let (metrics, setMetrics) = React.useState(_ => []) let (dimensions, setDimensions) = React.useState(_ => []) let fetchDetails = useGetMethod() - let {connector_success_rate} = + let {isLiveMode} = HyperswitchAtom.featureFlagAtom ->Recoil.useRecoilValueFromAtom ->LogicUtils.safeParse @@ -78,7 +78,7 @@ let make = () => { tabKeys tabValues options - singleStatEntity={getSingleStatEntity(metrics, connector_success_rate)} + singleStatEntity={getSingleStatEntity(metrics, !isLiveMode)} getTable={getPaymentTable} colMapper tableEntity={paymentTableEntity}