diff --git a/src/components/addresses/ContextualAddress.tsx b/src/components/addresses/ContextualAddress.tsx index 98e23df..6d9653c 100644 --- a/src/components/addresses/ContextualAddress.tsx +++ b/src/components/addresses/ContextualAddress.tsx @@ -88,10 +88,14 @@ const addressCopyButtons = useBooleanSetting("addressCopyButtons"); if (!origAddress) return ( - {t("contextualAddressUnknown")} + + {t("contextualAddressUnknown")} + ); - const address = typeof origAddress === "object" ? origAddress.address : origAddress; + const address = typeof origAddress === "object" + ? origAddress.address + : origAddress; // If we were given a wallet, use it. Otherwise, look it up, unless it was // explicitly excluded (e.g. the Wallets table) @@ -100,7 +104,11 @@ : undefined; const commonMeta = parseCommonMeta(nameSuffix, metadata); - const hasMetaname = source ? !!commonMeta?.returnRecipient : !!commonMeta?.recipient; + const hasMetaname = source + ? !!commonMeta?.returnRecipient + : !!commonMeta?.recipient; + + const showTooltip = (hideNameAddress && !!hasMetaname) || !!wallet?.label; const copyable = !neverCopyable && addressCopyButtons ? { text: address } : undefined; @@ -123,7 +131,7 @@ {commonMeta && hasMetaname ? ( @@ -147,6 +155,10 @@ ) } + + {/* This empty child here forces the Tooltip to change its hover + * behaviour. Pretty funky, needs investigating. */} + <> ; }