diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js index 55c9576d1bce..699371d0fb26 100644 --- a/ui/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -662,7 +662,7 @@ export const getNonTestNetworks = createDeepEqualSelector( imageUrl: LINEA_MAINNET_TOKEN_IMAGE_URL, }, providerType: NETWORK_TYPES.LINEA_MAINNET, - ticker: TEST_NETWORK_TICKER_MAP[NETWORK_TYPES.LINEA_MAINNET], + ticker: CURRENCY_SYMBOLS.ETH, id: NETWORK_TYPES.LINEA_MAINNET, removable: false, }, diff --git a/ui/selectors/selectors.test.js b/ui/selectors/selectors.test.js index f40a8497a86b..a0958bb68b52 100644 --- a/ui/selectors/selectors.test.js +++ b/ui/selectors/selectors.test.js @@ -585,6 +585,38 @@ describe('Selectors', () => { }); }); + describe('#getNonTestNetworks', () => { + it('returns nonTestNetworks', () => { + const nonTestNetworks = selectors.getNonTestNetworks({ + metamask: { + networkConfigurations: {}, + }, + }); + + // Assert that the `nonTestNetworks` array returned by the selector matches a specific structure. + expect(nonTestNetworks).toStrictEqual( + expect.arrayContaining([ + expect.objectContaining({ + chainId: expect.any(String), + nickname: expect.any(String), + rpcUrl: expect.any(String), + rpcPrefs: expect.objectContaining({ + imageUrl: expect.any(String), + }), + providerType: expect.any(String), + ticker: expect.any(String), + id: expect.any(String), + removable: expect.any(Boolean), + }), + ]), + ); + + // Verify that each network object has a 'ticker' property that is not undefined + nonTestNetworks.forEach((network) => { + expect(network.ticker).toBeDefined(); + }); + }); + }); describe('#getAllNetworks', () => { it('sorts Localhost to the bottom of the test lists', () => { const networks = selectors.getAllNetworks({