fix selector
This commit is contained in:
parent
0e9b6d2cc1
commit
cff53e76c9
|
@ -39,14 +39,11 @@ export const getNameFromAddressBook = createSelector(
|
|||
getAddressBookListSelector,
|
||||
(_, address) => address,
|
||||
(addressBook: Map<string, AddressBook>, address: string) => {
|
||||
if (!address) {
|
||||
return 'UNKNOWN'
|
||||
}
|
||||
|
||||
const adbkEntry = addressBook.find((addressBookItem) => addressBookItem.address === address)
|
||||
if (adbkEntry) {
|
||||
return adbkEntry.name
|
||||
}
|
||||
|
||||
return 'UNKNOWN'
|
||||
},
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue