From 282c61c8a74d9b5d0a6ec6b7aa39e2de5ea0e721 Mon Sep 17 00:00:00 2001 From: Riddhi Agrawal Date: Mon, 18 Dec 2023 18:49:04 +0530 Subject: [PATCH] fix: reverted unused code --- config/FeatureFlag.json | 6 ++-- .../hyperswitch/HyperSwitchApp.res | 29 +++++++++---------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/config/FeatureFlag.json b/config/FeatureFlag.json index ac1acffba..b31e3882e 100644 --- a/config/FeatureFlag.json +++ b/config/FeatureFlag.json @@ -1,13 +1,13 @@ { "test_live_toggle": false, "is_live_mode": false, - "magic_link": true, + "magic_link": false, "production_access": false, - "quick_start": true, + "quick_start": false, "switch_merchant": false, "audit_trail": false, "system_metrics": false, - "sample_data": true, + "sample_data": false, "frm": false, "payout": false, "recon": false, diff --git a/src/entryPoints/hyperswitch/HyperSwitchApp.res b/src/entryPoints/hyperswitch/HyperSwitchApp.res index 03a877762..9be7d219c 100644 --- a/src/entryPoints/hyperswitch/HyperSwitchApp.res +++ b/src/entryPoints/hyperswitch/HyperSwitchApp.res @@ -75,22 +75,21 @@ let make = () => { sessionExpired := false let getAgreementEnum = async () => { - // open LogicUtils - // try { - // let url = #ProductionAgreement->ProdOnboardingUtils.getProdOnboardingUrl - // let response = await fetchDetails(url) + open LogicUtils + try { + let url = #ProductionAgreement->ProdOnboardingUtils.getProdOnboardingUrl + let response = await fetchDetails(url) - // if response->getDictFromJsonObject->getBool("ProductionAgreement", false) { - // setDashboardPageState(_ => #PROD_ONBOARDING) - // } else { - // setDashboardPageState(_ => #AGREEMENT_SIGNATURE) - // } - // } catch { - // | _ => - // setDashboardPageState(_ => #HOME) - // setScreenState(_ => PageLoaderWrapper.Success) - // } - setDashboardPageState(_ => #PROD_ONBOARDING) + if response->getDictFromJsonObject->getBool("ProductionAgreement", false) { + setDashboardPageState(_ => #PROD_ONBOARDING) + } else { + setDashboardPageState(_ => #AGREEMENT_SIGNATURE) + } + } catch { + | _ => + setDashboardPageState(_ => #HOME) + setScreenState(_ => PageLoaderWrapper.Success) + } } let fetchInitialEnums = async () => {