From 1a555148efe72b01bab729db84d3d8bb17c8803a Mon Sep 17 00:00:00 2001 From: Susritha <106534816+susrithasabbini@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:33:06 +0530 Subject: [PATCH] fix: removing unused feature flags (#1920) --- README.md | 4 ---- config/config.toml | 2 -- cypress/e2e/auth/auth.cy.js | 1 - .../AuthModule/TwoFaAuth/TwoFaElements.res | 2 +- src/entryPoints/FeatureFlagUtils.res | 6 ------ src/entryPoints/HyperSwitchApp.res | 2 +- src/entryPoints/SidebarValues.res | 3 +-- src/screens/Transaction/Disputes/Disputes.res | 11 ++++------- src/screens/Transaction/Order/Orders.res | 11 ++++------- src/screens/Transaction/Refunds/Refund.res | 11 ++++------- 10 files changed, 15 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index d62c55f06..758814373 100644 --- a/README.md +++ b/README.md @@ -136,10 +136,6 @@ In Live mode, current users are not allowed to sign up. Users must be created ma The `email` feature flag enables user sign-in and sign-up using magic links instead of passwords. When enabled, users can request a magic link via email that logs them into their account or creates a new account if they are signing up. -#### Quick Start - -The `quick_start` feature flag enables the simplified onboarding flow for new users, where they connect to processors, configure payment routing and test a payment, all in one flow. - ### Surcharge The `surcharge` feature flag enables the ability to apply surcharges to payments. When enabled, you can create advanced rules based on payment parameters like amount, currency, and payment method to enforce surcharges as needed. diff --git a/config/config.toml b/config/config.toml index 5aa7af575..06d19bee5 100644 --- a/config/config.toml +++ b/config/config.toml @@ -41,7 +41,6 @@ configure_pmts=false branding=false live_users_counter=false granularity=false -custom_webhook_headers=false compliance_certificate=false pm_authentication_processor=true performance_monitor=false @@ -50,7 +49,6 @@ new_analytics_smart_retries=false new_analytics_refunds=false down_time=false tax_processor=true -transaction_view=false x_feature_route=false tenant_user=false [default.merchant_config] diff --git a/cypress/e2e/auth/auth.cy.js b/cypress/e2e/auth/auth.cy.js index d72dfb8f7..b5bb0621e 100644 --- a/cypress/e2e/auth/auth.cy.js +++ b/cypress/e2e/auth/auth.cy.js @@ -92,7 +92,6 @@ describe("Auth Module", () => { branding: false, live_users_counter: false, granularity: false, - custom_webhook_headers: false, compliance_certificate: false, user_management_revamp: false, pm_authentication_processor: true, diff --git a/src/entryPoints/AuthModule/TwoFaAuth/TwoFaElements.res b/src/entryPoints/AuthModule/TwoFaAuth/TwoFaElements.res index 1f92782bd..da35146a9 100644 --- a/src/entryPoints/AuthModule/TwoFaAuth/TwoFaElements.res +++ b/src/entryPoints/AuthModule/TwoFaAuth/TwoFaElements.res @@ -68,7 +68,7 @@ module ShowRecoveryCodes = { @react.component let make = (~recoveryCodes) => {
+ className="border border-gray-200 rounded-md bg-jp-gray-100 py-6 px-12 flex gap-8 justify-evenly">
{recoveryCodes ->Array.map(recoveryCode => diff --git a/src/entryPoints/FeatureFlagUtils.res b/src/entryPoints/FeatureFlagUtils.res index f7d30b002..2ce2d4a47 100644 --- a/src/entryPoints/FeatureFlagUtils.res +++ b/src/entryPoints/FeatureFlagUtils.res @@ -8,7 +8,6 @@ type featureFlag = { default: bool, testLiveToggle: bool, email: bool, - quickStart: bool, isLiveMode: bool, auditTrail: bool, systemMetrics: bool, @@ -34,7 +33,6 @@ type featureFlag = { branding: bool, liveUsersCounter: bool, granularity: bool, - customWebhookHeaders: bool, complianceCertificate: bool, pmAuthenticationProcessor: bool, performanceMonitor: bool, @@ -43,7 +41,6 @@ type featureFlag = { newAnalyticsRefunds: bool, downTime: bool, taxProcessor: bool, - transactionView: bool, xFeatureRoute: bool, tenantUser: bool, } @@ -55,7 +52,6 @@ let featureFlagType = (featureFlags: JSON.t) => { default: dict->getBool("default", true), testLiveToggle: dict->getBool("test_live_toggle", false), email: dict->getBool("email", false), - quickStart: dict->getBool("quick_start", false), isLiveMode: dict->getBool("is_live_mode", false), auditTrail: dict->getBool("audit_trail", false), systemMetrics: dict->getBool("system_metrics", false), @@ -81,7 +77,6 @@ let featureFlagType = (featureFlags: JSON.t) => { branding: dict->getBool("branding", false), liveUsersCounter: dict->getBool("live_users_counter", false), granularity: dict->getBool("granularity", false), - customWebhookHeaders: dict->getBool("custom_webhook_headers", false), complianceCertificate: dict->getBool("compliance_certificate", false), pmAuthenticationProcessor: dict->getBool("pm_authentication_processor", false), performanceMonitor: dict->getBool("performance_monitor", false), @@ -90,7 +85,6 @@ let featureFlagType = (featureFlags: JSON.t) => { newAnalyticsRefunds: dict->getBool("new_analytics_refunds", false), downTime: dict->getBool("down_time", false), taxProcessor: dict->getBool("tax_processor", false), - transactionView: dict->getBool("transaction_view", false), xFeatureRoute: dict->getBool("x_feature_route", false), tenantUser: dict->getBool("tenant_user", false), } diff --git a/src/entryPoints/HyperSwitchApp.res b/src/entryPoints/HyperSwitchApp.res index 04c2bbc52..973b6cc78 100644 --- a/src/entryPoints/HyperSwitchApp.res +++ b/src/entryPoints/HyperSwitchApp.res @@ -321,7 +321,7 @@ let make = () => { setShowModal={setShowFeedbackModal} /> - +
diff --git a/src/entryPoints/SidebarValues.res b/src/entryPoints/SidebarValues.res index 4db4ed63d..dbb0d8c4b 100644 --- a/src/entryPoints/SidebarValues.res +++ b/src/entryPoints/SidebarValues.res @@ -672,7 +672,6 @@ let useGetSidebarValues = (~isReconEnabled: bool) => { surcharge: isSurchargeEnabled, isLiveMode, threedsAuthenticator, - quickStart, disputeAnalytics, configurePmts, complianceCertificate, @@ -688,7 +687,7 @@ let useGetSidebarValues = (~isReconEnabled: bool) => { let isNewAnalyticsEnable = newAnalytics && useIsFeatureEnabledForMerchant(merchantSpecificConfig.newAnalytics) let sidebar = [ - productionAccessComponent(quickStart, userHasAccess, hasAnyGroupAccess), + productionAccessComponent(isLiveMode, userHasAccess, hasAnyGroupAccess), default->home, default->operations(~userHasResourceAccess, ~isPayoutsEnabled=payOut, ~userEntity), default->connectors( diff --git a/src/screens/Transaction/Disputes/Disputes.res b/src/screens/Transaction/Disputes/Disputes.res index 5866e1c36..0c198b47a 100644 --- a/src/screens/Transaction/Disputes/Disputes.res +++ b/src/screens/Transaction/Disputes/Disputes.res @@ -13,8 +13,7 @@ let make = () => { let (offset, setOffset) = React.useState(_ => 0) let (filters, setFilters) = React.useState(_ => None) - let {generateReport, transactionView} = - HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom + let {generateReport} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom let {updateTransactionEntity} = OMPSwitchHooks.useUserInfo() let {userInfo: {transactionEntity}, checkUserEntity} = React.useContext( UserInfoProvider.defaultContext, @@ -107,11 +106,9 @@ let make = () => {
- -
- -
-
+
+ +
{filtersUI}
diff --git a/src/screens/Transaction/Order/Orders.res b/src/screens/Transaction/Order/Orders.res index 5845184b9..f0d1466ab 100644 --- a/src/screens/Transaction/Order/Orders.res +++ b/src/screens/Transaction/Order/Orders.res @@ -28,8 +28,7 @@ let make = (~previewOnly=false) => { let pageDetailDict = Recoil.useRecoilValueFromAtom(LoadedTable.table_pageDetails) let pageDetail = pageDetailDict->Dict.get("Orders")->Option.getOr(defaultValue) let (offset, setOffset) = React.useState(_ => pageDetail.offset) - let {generateReport, transactionView} = - HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom + let {generateReport} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom let fetchOrders = () => { if !previewOnly { @@ -147,11 +146,9 @@ let make = (~previewOnly=false) => {
- -
- -
-
+
+ +
{filtersUI}
diff --git a/src/screens/Transaction/Refunds/Refund.res b/src/screens/Transaction/Refunds/Refund.res index 01fcaf498..c2c6ac616 100644 --- a/src/screens/Transaction/Refunds/Refund.res +++ b/src/screens/Transaction/Refunds/Refund.res @@ -64,8 +64,7 @@ let make = () => { None }, (offset, filters, searchText)) - let {generateReport, transactionView} = - HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom + let {generateReport} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom
@@ -82,11 +81,9 @@ let make = () => {
- -
- -
-
+
+ +