From dbaf84325c66de91b10fdfa25bf1044b537e6a05 Mon Sep 17 00:00:00 2001 From: user Date: Sat, 28 Feb 2026 14:30:43 -0800 Subject: [PATCH] fix: add click-to-copy and etherscan link to block number on success-tx Block number on the transaction success view now has the same treatment as addresses and transaction hashes: dashed-underline click-to-copy and an external link icon linking to etherscan.io/block/{number}. Closes #99 --- src/popup/views/txStatus.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/popup/views/txStatus.js b/src/popup/views/txStatus.js index e8dee6e..91d6746 100644 --- a/src/popup/views/txStatus.js +++ b/src/popup/views/txStatus.js @@ -50,6 +50,16 @@ function toAddressHtml(address) { return `
${dot}${escapeHtml(address)}${extLink}
`; } +function blockNumberHtml(blockNumber) { + const num = String(blockNumber); + const link = `https://etherscan.io/block/${num}`; + const extLink = `${EXT_ICON}`; + return ( + `${escapeHtml(num)}` + + extLink + ); +} + function txHashHtml(hash) { const link = `https://etherscan.io/tx/${hash}`; const extLink = `${EXT_ICON}`; @@ -189,7 +199,7 @@ function renderSuccess() { $("success-tx-to").innerHTML = toAddressHtml(d.to); } - $("success-tx-block").textContent = String(d.blockNumber); + $("success-tx-block").innerHTML = blockNumberHtml(d.blockNumber); $("success-tx-hash").innerHTML = txHashHtml(d.hash); // Show decoded calldata details if present