From 5b917444d4890bf5b254aeb2a41250ef7ac448d1 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Mon, 19 Sep 2022 15:41:48 -0230 Subject: [PATCH] Revert "Ensure that 'tokens found in this account' message is only shown when token detection activated (#15823)" (#15879) This reverts commit b359844dc550e2c97e922b2008185b646e7caa04. --- ui/components/app/asset-list/asset-list.js | 13 ++++++++----- ui/selectors/selectors.js | 15 --------------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/ui/components/app/asset-list/asset-list.js b/ui/components/app/asset-list/asset-list.js index 27b8664f6..a55ed3677 100644 --- a/ui/components/app/asset-list/asset-list.js +++ b/ui/components/app/asset-list/asset-list.js @@ -11,7 +11,7 @@ import { getShouldShowFiat, getNativeCurrencyImage, getDetectedTokensInCurrentNetwork, - getDisplayDetectedTokensLink, + getIstokenDetectionInactiveOnNonMainnetSupportedNetwork, } from '../../../selectors'; import { getNativeCurrency } from '../../../ducks/metamask/metamask'; import { useCurrencyDisplay } from '../../../hooks/useCurrencyDisplay'; @@ -66,7 +66,9 @@ const AssetList = ({ onClickAsset }) => { const primaryTokenImage = useSelector(getNativeCurrencyImage); const detectedTokens = useSelector(getDetectedTokensInCurrentNetwork) || []; - const displayDetectedTokensLink = useSelector(getDisplayDetectedTokensLink); + const istokenDetectionInactiveOnNonMainnetSupportedNetwork = useSelector( + getIstokenDetectionInactiveOnNonMainnetSupportedNetwork, + ); return ( <> @@ -94,9 +96,10 @@ const AssetList = ({ onClickAsset }) => { }); }} /> - {detectedTokens.length > 0 && displayDetectedTokensLink && ( - - )} + {detectedTokens.length > 0 && + !istokenDetectionInactiveOnNonMainnetSupportedNetwork && ( + + )} 0 ? 0 : 4}>