diff --git a/src/components/settings/ContractVersion/index.tsx b/src/components/settings/ContractVersion/index.tsx index f866459b92..5082dd3d68 100644 --- a/src/components/settings/ContractVersion/index.tsx +++ b/src/components/settings/ContractVersion/index.tsx @@ -1,14 +1,17 @@ import { useMemo } from 'react' -import { Typography } from '@mui/material' +import { SvgIcon, Typography } from '@mui/material' import { ImplementationVersionState } from '@safe-global/safe-gateway-typescript-sdk' import { LATEST_SAFE_VERSION } from '@/config/constants' import { sameAddress } from '@/utils/addresses' import type { MasterCopy } from '@/hooks/useMasterCopies' import { MasterCopyDeployer, useMasterCopies } from '@/hooks/useMasterCopies' import useSafeInfo from '@/hooks/useSafeInfo' +import CheckCircleIcon from '@mui/icons-material/CheckCircle' +import InfoIcon from '@/public/images/notifications/info.svg' import UpdateSafeDialog from './UpdateSafeDialog' import ExternalLink from '@/components/common/ExternalLink' +import Tooltip from '@mui/material/Tooltip' export const ContractVersion = ({ isGranted }: { isGranted: boolean }) => { const [masterCopies] = useMasterCopies() @@ -22,7 +25,6 @@ export const ContractVersion = ({ isGranted }: { isGranted: boolean }) => { const needsUpdate = safe.implementationVersionState === ImplementationVersionState.OUTDATED const latestMasterContractVersion = LATEST_SAFE_VERSION const showUpdateDialog = safeMasterCopy?.deployer === MasterCopyDeployer.GNOSIS && needsUpdate - const getSafeVersionUpdate = () => { return showUpdateDialog ? ` (there's a newer version: ${latestMasterContractVersion})` : '' } @@ -42,6 +44,35 @@ export const ContractVersion = ({ isGranted }: { isGranted: boolean }) => { Unsupported contract )} +
+ {needsUpdate ? ( + + Why should I upgrade? + + + + + + + ) : ( + + Latest version + + )} +
{showUpdateDialog && isGranted && }