From 7d1d584b52b0b0484607fdd89fccf6e2f1b101b2 Mon Sep 17 00:00:00 2001 From: user Date: Sat, 28 Feb 2026 14:52:06 -0800 Subject: [PATCH] feat: make block number click-to-copy with Etherscan external link on success-tx view Closes #99 The block number on the success-tx view is now styled consistently with other blockchain entities (addresses, tx hashes): it has a dashed underline for click-to-copy and an external link icon pointing to etherscan.io/block/. --- 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..66edb5d 100644 --- a/src/popup/views/txStatus.js +++ b/src/popup/views/txStatus.js @@ -59,6 +59,16 @@ function txHashHtml(hash) { ); } +function blockNumberHtml(blockNumber) { + const num = String(blockNumber); + const link = `https://etherscan.io/block/${num}`; + const extLink = `${EXT_ICON}`; + return ( + `${escapeHtml(num)}` + + extLink + ); +} + function attachCopyHandlers(viewId) { document .getElementById(viewId) @@ -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