From a655c546b728562c73705bb8aebdc48c0b77e5a9 Mon Sep 17 00:00:00 2001 From: clawbot Date: Sat, 28 Feb 2026 12:05:19 -0800 Subject: [PATCH] fix: make token contract display on confirm-tx consistent with other views Add color dot (addressDotHtml), dashed underline styling, and click-to-copy functionality to the token contract address on the confirm-tx page, matching the display pattern used in addressToken, txStatus, and other views. Closes #70 --- src/popup/views/confirmTx.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/popup/views/confirmTx.js b/src/popup/views/confirmTx.js index f11cf68..787de0b 100644 --- a/src/popup/views/confirmTx.js +++ b/src/popup/views/confirmTx.js @@ -14,6 +14,7 @@ const { showError, hideError, showView, + showFlash, addressTitle, addressDotHtml, escapeHtml, @@ -95,11 +96,22 @@ function show(txInfo) { // Token contract section (ERC-20 only) const tokenSection = $("confirm-token-section"); if (isErc20) { + const dot = addressDotHtml(txInfo.token); const link = etherscanTokenLink(txInfo.token); $("confirm-token-contract").innerHTML = - escapeHtml(txInfo.token) + - ` ${EXT_ICON}`; + `
${dot}` + + `${escapeHtml(txInfo.token)}` + + `${EXT_ICON}` + + `
`; tokenSection.classList.remove("hidden"); + // Attach click-to-copy on the contract address + const copyEl = tokenSection.querySelector("[data-copy]"); + if (copyEl) { + copyEl.onclick = () => { + navigator.clipboard.writeText(copyEl.dataset.copy); + showFlash("Copied!"); + }; + } } else { tokenSection.classList.add("hidden"); } -- 2.49.1