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

feature/default_network_editable
ryanml 3 years ago committed by GitHub
parent f49e5076f3
commit d4f694c49f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      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

Loading…
Cancel
Save