1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-29 23:58:06 +01:00

Fix token details icon when 'Use Token Detection' is enabled (#13726)

This commit is contained in:
ryanml 2022-02-23 13:43:41 -07:00
parent b3b5d3c8d9
commit 1883af8ab4

View File

@ -35,8 +35,9 @@ export default function TokenDetailsPage() {
const useTokenDetection = useSelector(getUseTokenDetection); const useTokenDetection = useSelector(getUseTokenDetection);
const tokenAddress = history?.location?.state?.tokenAddress; const tokenAddress = history?.location?.state?.tokenAddress;
const tokenMetadata = Object.values(tokenList).find((token) =>
const tokenMetadata = tokenList?.[tokenAddress]; isEqualCaseInsensitive(token.address, tokenAddress),
);
const fileName = tokenMetadata?.iconUrl; const fileName = tokenMetadata?.iconUrl;
const imagePath = useTokenDetection const imagePath = useTokenDetection
? fileName ? fileName