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