From 1883af8ab4937cc5bb10c20640c1ff329a860a52 Mon Sep 17 00:00:00 2001 From: ryanml Date: Wed, 23 Feb 2022 13:43:41 -0700 Subject: [PATCH] Fix token details icon when 'Use Token Detection' is enabled (#13726) --- ui/pages/token-details/token-details-page.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/pages/token-details/token-details-page.js b/ui/pages/token-details/token-details-page.js index 01fdd17f8..522a7a5d4 100644 --- a/ui/pages/token-details/token-details-page.js +++ b/ui/pages/token-details/token-details-page.js @@ -35,8 +35,9 @@ export default function TokenDetailsPage() { const useTokenDetection = useSelector(getUseTokenDetection); const tokenAddress = history?.location?.state?.tokenAddress; - - const tokenMetadata = tokenList?.[tokenAddress]; + const tokenMetadata = Object.values(tokenList).find((token) => + isEqualCaseInsensitive(token.address, tokenAddress), + ); const fileName = tokenMetadata?.iconUrl; const imagePath = useTokenDetection ? fileName