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