Fix - Owners list error (#1127)
* Add validation for addressBooj * Fix types * Update default value * Update src/logic/addressBook/utils/index.ts Co-authored-by: Fernando <fernando.greco@gmail.com> Co-authored-by: Mati Dastugue <mdastugu@amazon.com> Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com> Co-authored-by: Fernando <fernando.greco@gmail.com>
This commit is contained in:
parent
91a85ae9ea
commit
8a6b219781
|
@ -12,7 +12,7 @@ export const getAddressBook = createSelector(
|
|||
(addressBook, safeAddress) => {
|
||||
let result = Map([])
|
||||
if (addressBook) {
|
||||
result = addressBook.get(safeAddress)
|
||||
result = addressBook.get(safeAddress, List([]))
|
||||
}
|
||||
return result
|
||||
},
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import { List } from 'immutable'
|
||||
import { loadFromStorage, saveToStorage } from 'src/utils/storage'
|
||||
import { AddressBookEntryProps } from './../model/addressBook'
|
||||
import { SafeOwner } from 'src/routes/safe/store/models/safe'
|
||||
|
||||
const ADDRESS_BOOK_STORAGE_KEY = 'ADDRESS_BOOK_STORAGE_KEY'
|
||||
|
||||
|
@ -27,7 +29,10 @@ export const getNameFromAdbk = (addressBook, userAddress) => {
|
|||
return null
|
||||
}
|
||||
|
||||
export const getOwnersWithNameFromAddressBook = (addressBook, ownerList) => {
|
||||
export const getOwnersWithNameFromAddressBook = (
|
||||
addressBook: AddressBookEntryProps,
|
||||
ownerList: List<SafeOwner>,
|
||||
): List<SafeOwner> | [] => {
|
||||
if (!ownerList) {
|
||||
return []
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue