From 5fdc7bf773588b8885ea7ced9f102c9cffabafda Mon Sep 17 00:00:00 2001 From: bergeron Date: Mon, 18 Sep 2023 08:52:01 -0500 Subject: [PATCH 1/2] Move token detection to top of assets --- ui/components/app/asset-list/asset-list.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ui/components/app/asset-list/asset-list.js b/ui/components/app/asset-list/asset-list.js index 0cb8e636ced3..010997d3ca6a 100644 --- a/ui/components/app/asset-list/asset-list.js +++ b/ui/components/app/asset-list/asset-list.js @@ -69,6 +69,13 @@ const AssetList = ({ onClickAsset }) => { return ( <> {process.env.MULTICHAIN ? : null} + {detectedTokens.length > 0 && + !isTokenDetectionInactiveOnNonMainnetSupportedNetwork ? ( + setShowDetectedTokens(true)} + margin={4} + /> + ) : null} onClickAsset(nativeCurrency)} title={nativeCurrency} @@ -92,13 +99,6 @@ const AssetList = ({ onClickAsset }) => { }); }} /> - {detectedTokens.length > 0 && - !isTokenDetectionInactiveOnNonMainnetSupportedNetwork ? ( - setShowDetectedTokens(true)} - margin={4} - /> - ) : null} 0 ? 0 : 4}> From b9f14c7d873050a4435fe431e1dfa7571f6dfd2a Mon Sep 17 00:00:00 2001 From: bergeron Date: Tue, 19 Sep 2023 13:44:28 -0500 Subject: [PATCH 2/2] && instead of ternary + null --- ui/components/app/asset-list/asset-list.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/components/app/asset-list/asset-list.js b/ui/components/app/asset-list/asset-list.js index 010997d3ca6a..efe57253ec6e 100644 --- a/ui/components/app/asset-list/asset-list.js +++ b/ui/components/app/asset-list/asset-list.js @@ -70,12 +70,12 @@ const AssetList = ({ onClickAsset }) => { <> {process.env.MULTICHAIN ? : null} {detectedTokens.length > 0 && - !isTokenDetectionInactiveOnNonMainnetSupportedNetwork ? ( - setShowDetectedTokens(true)} - margin={4} - /> - ) : null} + !isTokenDetectionInactiveOnNonMainnetSupportedNetwork && ( + setShowDetectedTokens(true)} + margin={4} + /> + )} onClickAsset(nativeCurrency)} title={nativeCurrency}