diff --git a/src/components/NavLinks.tsx b/src/components/NavLinks.tsx
index 3790cf8a..871dfea8 100644
--- a/src/components/NavLinks.tsx
+++ b/src/components/NavLinks.tsx
@@ -63,18 +63,21 @@ const NavLinks = () => {
{t('insurance')}
- {/*
- Nexus Mutual{' '}
+
+ Cover Protocol
- */}
+
- Cover Protocol
+ Nexus Mutual{' '}
{
@@ -46,12 +45,7 @@ const SafeDetails = ({ ...props }) => {
geb,
isRPCAdapterOn,
})
- const safeData = await safeActions.fetchManagedSafe(safeId)
- if (safeData && !safeData.safes.length) {
- await timeout(200)
- props.history.push('/')
- return
- }
+ await safeActions.fetchManagedSafe(safeId)
popupsActions.setIsWaitingModalOpen(false)
}
diff --git a/src/containers/Shared.tsx b/src/containers/Shared.tsx
index 0fb4b695..1a89b6d8 100644
--- a/src/containers/Shared.tsx
+++ b/src/containers/Shared.tsx
@@ -31,17 +31,20 @@ import AuctionsModal from '../components/Modals/AuctionsModal'
import AlertLabel from '../components/AlertLabel'
import useGeb from '../hooks/useGeb'
import SafeManagerModal from '../components/Modals/SafeManagerModal'
+import { isAddress } from '@ethersproject/address'
interface Props {
children: ReactNode
}
-const Shared = ({ children }: Props) => {
+const Shared = ({ children, ...rest }: Props) => {
const { t } = useTranslation()
const { chainId, account, library, connector } = useActiveWeb3React()
const geb = useGeb()
const history = useHistory()
+
const previousAccount = usePrevious(account)
+
const {
settingsModel: settingsState,
connectWalletModel: connectWalletState,
@@ -95,6 +98,19 @@ const Shared = ({ children }: Props) => {
await timeout(200)
if (!connectWalletState.ctHash) {
connectWalletActions.setStep(2)
+ const { pathname } = history.location
+ let address = ''
+ if (pathname && pathname !== '/') {
+ const route = pathname.split('/')[1]
+ if (isAddress(route)) {
+ address = route.toLowerCase()
+ }
+ }
+ await safeActions.fetchUserSafes({
+ address: address ? address : (account as string),
+ geb,
+ isRPCAdapterOn: settingsState.isRPCAdapterOn,
+ })
}
} catch (error) {
safeActions.setIsSafeCreated(false)