diff --git a/ui/components/app/asset-list/asset-list.js b/ui/components/app/asset-list/asset-list.js index 1f072b95b..903c4857d 100644 --- a/ui/components/app/asset-list/asset-list.js +++ b/ui/components/app/asset-list/asset-list.js @@ -10,7 +10,6 @@ import { getNativeCurrencyImage, getDetectedTokensInCurrentNetwork, getIstokenDetectionInactiveOnNonMainnetSupportedNetwork, - getTokenList, } from '../../../selectors'; import { getNativeCurrency } from '../../../ducks/metamask/metamask'; import { useCurrencyDisplay } from '../../../hooks/useCurrencyDisplay'; @@ -62,19 +61,15 @@ const AssetList = ({ onClickAsset }) => { const primaryTokenImage = useSelector(getNativeCurrencyImage); const detectedTokens = useSelector(getDetectedTokensInCurrentNetwork) || []; - const istokenDetectionInactiveOnNonMainnetSupportedNetwork = useSelector( + const isTokenDetectionInactiveOnNonMainnetSupportedNetwork = useSelector( getIstokenDetectionInactiveOnNonMainnetSupportedNetwork, ); - const tokenList = useSelector(getTokenList); - const tokenData = Object.values(tokenList).find( - (token) => token.symbol === primaryCurrencyProperties.suffix, - ); - const title = tokenData?.name || primaryCurrencyProperties.suffix; + return ( <> onClickAsset(nativeCurrency)} - title={title} + title={nativeCurrency} primary={ primaryCurrencyProperties.value ?? secondaryCurrencyProperties.value } @@ -96,7 +91,7 @@ const AssetList = ({ onClickAsset }) => { }} /> {detectedTokens.length > 0 && - !istokenDetectionInactiveOnNonMainnetSupportedNetwork ? ( + !isTokenDetectionInactiveOnNonMainnetSupportedNetwork ? ( setShowDetectedTokens(true)} margin={4}