diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js index 7e4d04eeb3de..3c49befb6dd3 100644 --- a/ui/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -2240,30 +2240,23 @@ export const getAllEnabledNetworks = createDeepEqualSelector( ); export const getChainIdsToPoll = createDeepEqualSelector( - getPreferences, getNetworkConfigurationsByChainId, getCurrentChainId, - (preferences, networkConfigurations, currentChainId) => { - const { pausedChainIds = [] } = preferences; - + (networkConfigurations, currentChainId) => { if (!process.env.PORTFOLIO_VIEW) { return [currentChainId]; } return Object.keys(networkConfigurations).filter( - (chainId) => - !TEST_CHAINS.includes(chainId) && !pausedChainIds.includes(chainId), + (chainId) => !TEST_CHAINS.includes(chainId), ); }, ); export const getNetworkClientIdsToPoll = createDeepEqualSelector( - getPreferences, getNetworkConfigurationsByChainId, getCurrentChainId, - (preferences, networkConfigurations, currentChainId) => { - const { pausedChainIds = [] } = preferences; - + (networkConfigurations, currentChainId) => { if (!process.env.PORTFOLIO_VIEW) { const networkConfiguration = networkConfigurations[currentChainId]; return [ @@ -2275,10 +2268,7 @@ export const getNetworkClientIdsToPoll = createDeepEqualSelector( return Object.entries(networkConfigurations).reduce( (acc, [chainId, network]) => { - if ( - !TEST_CHAINS.includes(chainId) && - !pausedChainIds.includes(chainId) - ) { + if (!TEST_CHAINS.includes(chainId)) { acc.push( network.rpcEndpoints[network.defaultRpcEndpointIndex] .networkClientId, diff --git a/ui/selectors/selectors.test.js b/ui/selectors/selectors.test.js index 85180dec45f4..d3799885eaf6 100644 --- a/ui/selectors/selectors.test.js +++ b/ui/selectors/selectors.test.js @@ -873,7 +873,6 @@ describe('Selectors', () => { it('returns only non-test chain IDs', () => { const chainIds = selectors.getChainIdsToPoll({ metamask: { - preferences: { pausedChainIds: [] }, networkConfigurationsByChainId, selectedNetworkClientId: 'mainnet', }, @@ -884,18 +883,6 @@ describe('Selectors', () => { CHAIN_IDS.LINEA_MAINNET, ]); }); - - it('does not return paused chain IDs', () => { - const chainIds = selectors.getChainIdsToPoll({ - metamask: { - preferences: { pausedChainIds: [CHAIN_IDS.LINEA_MAINNET] }, - networkConfigurationsByChainId, - selectedNetworkClientId: 'mainnet', - }, - }); - expect(Object.values(chainIds)).toHaveLength(1); - expect(chainIds).toStrictEqual([CHAIN_IDS.MAINNET]); - }); }); describe('#getNetworkClientIdsToPoll', () => { @@ -933,7 +920,6 @@ describe('Selectors', () => { it('returns only non-test chain IDs', () => { const chainIds = selectors.getNetworkClientIdsToPoll({ metamask: { - preferences: { pausedChainIds: [] }, networkConfigurationsByChainId, selectedNetworkClientId: 'mainnet', }, @@ -941,18 +927,6 @@ describe('Selectors', () => { expect(Object.values(chainIds)).toHaveLength(2); expect(chainIds).toStrictEqual(['mainnet', 'linea-mainnet']); }); - - it('does not return paused chain IDs', () => { - const chainIds = selectors.getNetworkClientIdsToPoll({ - metamask: { - preferences: { pausedChainIds: [CHAIN_IDS.LINEA_MAINNET] }, - networkConfigurationsByChainId, - selectedNetworkClientId: 'mainnet', - }, - }); - expect(Object.values(chainIds)).toHaveLength(1); - expect(chainIds).toStrictEqual(['mainnet']); - }); }); describe('#isHardwareWallet', () => {