From 5fdc7bf773588b8885ea7ced9f102c9cffabafda Mon Sep 17 00:00:00 2001 From: bergeron Date: Mon, 18 Sep 2023 08:52:01 -0500 Subject: [PATCH 1/3] 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/3] && 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} From 27f0f1bf9397eaae58d64eaa1b1bcdff172c0ffa Mon Sep 17 00:00:00 2001 From: bergeron Date: Wed, 20 Sep 2023 17:13:57 -0500 Subject: [PATCH 3/3] jump to autodetect tokens --- .../import-tokens-modal/import-tokens-modal.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ui/components/multichain/import-tokens-modal/import-tokens-modal.js b/ui/components/multichain/import-tokens-modal/import-tokens-modal.js index 255a2643175c..3bc95be4636f 100644 --- a/ui/components/multichain/import-tokens-modal/import-tokens-modal.js +++ b/ui/components/multichain/import-tokens-modal/import-tokens-modal.js @@ -452,7 +452,7 @@ export const ImportTokensModal = ({ onClose }) => { className="import-tokens-modal__autodetect" onClick={() => { history.push( - `${SECURITY_ROUTE}#advanced-settings-autodetect-tokens`, + `${SECURITY_ROUTE}#auto-detect-tokens`, ); onClose(); }} @@ -505,11 +505,12 @@ export const ImportTokensModal = ({ onClose }) => { + onClick={() => { history.push( - `${SECURITY_ROUTE}#advanced-settings-autodetect-tokens`, - ) - } + `${SECURITY_ROUTE}#auto-detect-tokens`, + ); + onClose(); + }} > {t('inYourSettings')} ,