diff --git a/src/components/welcome/MyAccounts/PaginatedSafeList.tsx b/src/components/welcome/MyAccounts/PaginatedSafeList.tsx index 49d8b27c29..28c3b090b8 100644 --- a/src/components/welcome/MyAccounts/PaginatedSafeList.tsx +++ b/src/components/welcome/MyAccounts/PaginatedSafeList.tsx @@ -1,4 +1,4 @@ -import type { ReactElement } from 'react' +import type { ReactElement, ReactNode } from 'react' import { useMemo, useState } from 'react' import { Button, Box, Paper, Typography } from '@mui/material' import AccountItem from './AccountItem' @@ -9,7 +9,7 @@ import css from './styles.module.css' type PaginatedSafeListProps = { safes: SafeItems - title: ReactElement + title: ReactNode safeCount?: number action?: ReactElement onLinkClick?: () => void @@ -20,7 +20,7 @@ const MAX_DEFAULT_SHOWN = 7 const PAGE_SIZE = 5 const PaginatedSafeList = ({ safes, title, action, safeCount, onLinkClick }: PaginatedSafeListProps) => { - const [maxShownSafes, setMaxSafes] = useState(DEFAULT_SHOWN) + const [maxShownSafes, setMaxShownSafes] = useState(DEFAULT_SHOWN) const shownSafes = useMemo(() => { if (safes.length <= MAX_DEFAULT_SHOWN) { diff --git a/src/components/welcome/MyAccounts/index.tsx b/src/components/welcome/MyAccounts/index.tsx index 2b704dd782..6bd4241435 100644 --- a/src/components/welcome/MyAccounts/index.tsx +++ b/src/components/welcome/MyAccounts/index.tsx @@ -17,8 +17,8 @@ type AccountsListProps = { onLinkClick?: () => void } const AccountsList = ({ safes, onLinkClick }: AccountsListProps) => { - const ownedSafes = useMemo(() => safes.filter(({ isWatchlist }) => !isWatchlist), [safes]) - const watchlistSafes = useMemo(() => safes.filter(({ isWatchlist }) => isWatchlist), [safes]) + const ownedSafes = useMemo(() => safes.filter(({ isOnWatchlist }) => !isOnWatchlist), [safes]) + const watchlistSafes = useMemo(() => safes.filter(({ isOnWatchlist }) => isOnWatchlist), [safes]) return ( @@ -31,7 +31,7 @@ const AccountsList = ({ safes, onLinkClick }: AccountsListProps) => { My accounts} + title="My accounts" safes={ownedSafes} safeCount={ownedSafes.length} onLinkClick={onLinkClick} diff --git a/src/components/welcome/MyAccounts/useAllSafes.ts b/src/components/welcome/MyAccounts/useAllSafes.ts index 2520d1c597..12a3df9265 100644 --- a/src/components/welcome/MyAccounts/useAllSafes.ts +++ b/src/components/welcome/MyAccounts/useAllSafes.ts @@ -11,7 +11,7 @@ import useWallet from '@/hooks/wallets/useWallet' export type SafeItems = Array<{ chainId: string address: string - isWatchlist: boolean + isOnWatchlist: boolean threshold?: number owners?: number }> @@ -48,7 +48,7 @@ const useAllSafes = (): SafeItems => { return uniqueAddresses.map((address) => ({ address, chainId, - isWatchlist: !(ownedOnChain || []).includes(address), + isOnWatchlist: !(ownedOnChain || []).includes(address), threshold: allAdded[chainId]?.[address]?.threshold, owners: allAdded[chainId]?.[address]?.owners.length, }))