From b29dc9ca89485d5d61117ee16c81fd287567f011 Mon Sep 17 00:00:00 2001 From: James Mealy Date: Thu, 7 Mar 2024 15:27:29 +0100 Subject: [PATCH] fix: cannot see watchlist safes when disconected (#3411) --- src/components/welcome/MyAccounts/useAllSafes.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/welcome/MyAccounts/useAllSafes.ts b/src/components/welcome/MyAccounts/useAllSafes.ts index d796790657..14206126ce 100644 --- a/src/components/welcome/MyAccounts/useAllSafes.ts +++ b/src/components/welcome/MyAccounts/useAllSafes.ts @@ -43,13 +43,12 @@ const useAllSafes = (): SafeItems | undefined => { const undeployedSafes = useAppSelector(selectUndeployedSafes) return useMemo(() => { - if (!allOwned) return - const chains = uniq(Object.keys(allAdded).concat(Object.keys(allOwned))) + const chains = uniq(Object.keys(allAdded).concat(Object.keys(allOwned || {}))) return chains.flatMap((chainId) => { if (!configs.some((item) => item.chainId === chainId)) return [] const addedOnChain = Object.keys(allAdded[chainId] || {}) - const ownedOnChain = allOwned[chainId] + const ownedOnChain = (allOwned || {})[chainId] const undeployedOnChain = Object.keys(undeployedSafes[chainId] || {}) const uniqueAddresses = uniq(addedOnChain.concat(ownedOnChain)).filter(Boolean)