From e3dbfd1af3ca8ce34c670983b583a2027b7d97db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Hr=C3=A1ch?= Date: Mon, 3 Feb 2025 19:49:25 +0100 Subject: [PATCH] feat(suite): remove experimental feature - ethereum-l2-support --- .../suite-data/files/translations/en.json | 2 -- .../actions/suite/constants/suiteConstants.ts | 3 --- .../suite/src/constants/suite/experimental.ts | 10 +------ .../src/hooks/settings/useNetworkSupport.ts | 26 +++---------------- packages/suite/src/support/messages.ts | 9 ------- 5 files changed, 4 insertions(+), 46 deletions(-) diff --git a/packages/suite-data/files/translations/en.json b/packages/suite-data/files/translations/en.json index 2353a54c06f..b8870ff8def 100644 --- a/packages/suite-data/files/translations/en.json +++ b/packages/suite-data/files/translations/en.json @@ -913,8 +913,6 @@ "TR_EXCHANGE_SWAP_SLIPPAGE_TOLERANCE": "Slippage tolerance", "TR_EXCHANGE_USE_NON_SUITE_ACCOUNT": "Use an account ({symbol}) that isn't in Suite", "TR_EXCHANGE_VERIFY_ADDRESS_STEP": "Receive address", - "TR_EXPERIMENTAL_ETHEREUM_L2_SUPPORT": "Support Ethereum L2 networks", - "TR_EXPERIMENTAL_ETHEREUM_L2_SUPPORT_DESCRIPTION": "Enable support for Arbitrum One, Base, and Optimism networks in coin settings.", "TR_EXPERIMENTAL_FEATURES": "Experimental", "TR_EXPERIMENTAL_FEATURES_ALLOW": "Experimental features", "TR_EXPERIMENTAL_FEATURES_WARNING": "For experienced users only. Use at your own risk. These features are in testing, may be unstable, and might not have long-term support.", diff --git a/packages/suite/src/actions/suite/constants/suiteConstants.ts b/packages/suite/src/actions/suite/constants/suiteConstants.ts index 23f934589ef..4b431fb29ec 100644 --- a/packages/suite/src/actions/suite/constants/suiteConstants.ts +++ b/packages/suite/src/actions/suite/constants/suiteConstants.ts @@ -1,5 +1,3 @@ -import type { NetworkSymbol } from '@suite-common/wallet-config'; - export const INIT = '@suite/init'; export const READY = '@suite/ready'; export const ERROR = '@suite/error'; @@ -38,4 +36,3 @@ export const LOCK_TYPE = { export const REQUEST_DEVICE_RECONNECT = '@suite/request-device-reconnect'; export const SET_EXPERIMENTAL_FEATURES = '@suite/set-experimental-features'; export const SET_SIDEBAR_WIDTH = '@suite/set-sidebar-width'; -export const EXPERIMENTAL_L2_NETWORKS: readonly NetworkSymbol[] = ['op', 'arb', 'base']; diff --git a/packages/suite/src/constants/suite/experimental.ts b/packages/suite/src/constants/suite/experimental.ts index 815b55df37d..a1e5714107b 100644 --- a/packages/suite/src/constants/suite/experimental.ts +++ b/packages/suite/src/constants/suite/experimental.ts @@ -6,11 +6,7 @@ import { EXPERIMENTAL_PASSWORD_MANAGER_KB_URL, HELP_CENTER_TOR_URL, Url } from ' import { Dispatch } from '../../types/suite'; -export type ExperimentalFeature = - | 'password-manager' - | 'tor-external' - | 'nft-section' - | 'ethereum-l2-support'; +export type ExperimentalFeature = 'password-manager' | 'tor-external' | 'nft-section'; export type ExperimentalFeatureConfig = { title: TranslationKey; @@ -43,10 +39,6 @@ export const EXPERIMENTAL_FEATURES: Record { const device = useSelector(selectSelectedDevice); const isDebug = useSelector(selectIsDebugModeActive); const deviceSupportedNetworkSymbols = useSelector(selectDeviceSupportedNetworks); - const isEthereumL2SupportEnabled = useSelector( - selectHasExperimentalFeature('ethereum-l2-support'), - ); - const enabledNetworks = useSelector(selectEnabledNetworks); - - const mainnets = getMainnets(isDebug).filter(network => { - if (isEthereumL2SupportEnabled) { - return true; // no filtering needed if L2 support is enabled - } - - // if L2 support is not enabled - const isExperimentalL2 = EXPERIMENTAL_L2_NETWORKS.includes(network.symbol); - const isEnabled = enabledNetworks.includes(network.symbol); - - // filter out experimental L2 networks unless they are in the enabled networks - return !(isExperimentalL2 && !isEnabled); - }); + + const mainnets = getMainnets(isDebug); const testnets = getTestnets(isDebug); diff --git a/packages/suite/src/support/messages.ts b/packages/suite/src/support/messages.ts index fcbd65f2b1a..5f44a55345a 100644 --- a/packages/suite/src/support/messages.ts +++ b/packages/suite/src/support/messages.ts @@ -4899,15 +4899,6 @@ export default defineMessages({ defaultMessage: "Adds an NFT section to EVM-based chain accounts, allowing you to view NFTs. Note: Sending NFTs isn't currently supported.", }, - TR_EXPERIMENTAL_ETHEREUM_L2_SUPPORT: { - id: 'TR_EXPERIMENTAL_ETHEREUM_L2_SUPPORT', - defaultMessage: 'Support Ethereum L2 networks', - }, - TR_EXPERIMENTAL_ETHEREUM_L2_SUPPORT_DESCRIPTION: { - id: 'TR_EXPERIMENTAL_ETHEREUM_L2_SUPPORT_DESCRIPTION', - defaultMessage: - 'Enable support for Arbitrum One, Base, and Optimism networks in coin settings.', - }, TR_EXPERIMENTAL_FEATURES_ALLOW: { id: 'TR_EXPERIMENTAL_FEATURES_ALLOW', defaultMessage: 'Experimental features',