From 8d230aceb68526e98376056396856cd8f7dbea36 Mon Sep 17 00:00:00 2001 From: clawbot Date: Sat, 28 Feb 2026 10:27:15 -0800 Subject: [PATCH] fix: enforce UI policies on transaction detail view - Add clickable affordance (border + hover state) to all Etherscan external links on addresses and transaction hash per clickable affordance policy - Fix address display when ENS name is present: show color dot and Etherscan link on the full address line (previously only shown on ENS name line) - Extract etherscanLinkHtml helper for consistent link styling Closes #59 --- src/popup/views/transactionDetail.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/popup/views/transactionDetail.js b/src/popup/views/transactionDetail.js index 6a94df3..08dfc60 100644 --- a/src/popup/views/transactionDetail.js +++ b/src/popup/views/transactionDetail.js @@ -37,11 +37,19 @@ function blockieHtml(address) { return ``; } +function etherscanLinkHtml(url) { + return ( + `${EXT_ICON}` + ); +} + function txAddressHtml(address, ensName, title) { const blockie = blockieHtml(address); const dot = addressDotHtml(address); const link = `https://etherscan.io/address/${address}`; - const extLink = `${EXT_ICON}`; + const extLink = etherscanLinkHtml(link); let html = `
${blockie}
`; if (title) { html += `
${escapeHtml(title)}
`; @@ -50,10 +58,10 @@ function txAddressHtml(address, ensName, title) { html += `
${dot}` + copyableHtml(ensName, "") + - extLink + `
` + - `
` + + `
${dot}` + copyableHtml(address, "break-all") + + extLink + `
`; } else { html += @@ -67,7 +75,7 @@ function txAddressHtml(address, ensName, title) { function txHashHtml(hash) { const link = `https://etherscan.io/tx/${hash}`; - const extLink = `${EXT_ICON}`; + const extLink = etherscanLinkHtml(link); return copyableHtml(hash, "break-all") + extLink; }