import React from "react"; import { ensResolver, ResolvedAddresses } from "../api/address-resolver"; import PlainAddress from "./PlainAddress"; import ENSName from "./ENSName"; type AddressOrENSNameProps = { address: string; selectedAddress?: string; text?: string; dontOverrideColors?: boolean; resolvedAddresses?: ResolvedAddresses | undefined; }; const AddressOrENSName: React.FC = ({ address, selectedAddress, text, dontOverrideColors, resolvedAddresses, }) => { const resolvedAddress = resolvedAddresses?.[address]; const linkable = address !== selectedAddress; if (resolvedAddress === undefined) { return ( ); } const [resolver, resolvedName] = resolvedAddress; if (resolver === ensResolver) { return ( ); } return <>; }; export default AddressOrENSName;