Skip to content

Commit

Permalink
Feat: resolve Safe address ENS in sidebar (safe-global#3671)
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh authored May 8, 2024
1 parent 7c185a3 commit 788ddaa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/sidebar/SidebarHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import EnvHintButton from '@/components/settings/EnvironmentVariables/EnvHintBut
import useSafeAddress from '@/hooks/useSafeAddress'
import ExplorerButton from '@/components/common/ExplorerButton'
import CopyTooltip from '@/components/common/CopyTooltip'
import { useAddressResolver } from '@/hooks/useAddressResolver'

const SafeHeader = (): ReactElement => {
const currency = useAppSelector(selectCurrency)
Expand All @@ -40,6 +41,7 @@ const SafeHeader = (): ReactElement => {
const { threshold, owners } = safe
const chain = useCurrentChain()
const settings = useAppSelector(selectSettings)
const { ens } = useAddressResolver(safeAddress)

const fiatTotal = useMemo(
() => (balances.fiatTotal ? formatCurrency(balances.fiatTotal, currency) : ''),
Expand All @@ -64,7 +66,7 @@ const SafeHeader = (): ReactElement => {

<div className={css.address}>
{safeAddress ? (
<EthHashInfo address={safeAddress} shortAddress showAvatar={false} />
<EthHashInfo address={safeAddress} shortAddress showAvatar={false} name={ens} />
) : (
<Typography variant="body2">
<Skeleton variant="text" width={86} />
Expand Down

0 comments on commit 788ddaa

Please sign in to comment.