mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
Improving getMemoizedMetadataContractName selector (#17432)
This commit is contained in:
parent
3e3abcafc2
commit
5a493fb38e
@ -830,8 +830,9 @@ export const getMemoizedMetadataContractName = createDeepEqualSelector(
|
||||
getTokenList,
|
||||
(_tokenList, address) => address,
|
||||
(tokenList, address) => {
|
||||
const checksumHexAddress = toChecksumHexAddress(address);
|
||||
const entry = Object.values(tokenList).find((identity) =>
|
||||
isEqualCaseInsensitive(identity.address, toChecksumHexAddress(address)),
|
||||
isEqualCaseInsensitive(identity.address, checksumHexAddress),
|
||||
);
|
||||
return entry && entry.name !== '' ? entry.name : '';
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user