-
Block
-
+
+
+
-
-
-
-
-
Gas used
-
+
+
+
+
+
+
+
+ Transaction fee
+
+
+
+
+
+
+
diff --git a/src/popup/styles/main.css b/src/popup/styles/main.css
index f0b3a24..b1f2833 100644
--- a/src/popup/styles/main.css
+++ b/src/popup/styles/main.css
@@ -44,3 +44,11 @@ body {
background-color 225ms ease-out,
color 225ms ease-out;
}
+
+/* Transaction detail view — visual grouping of related fields */
+.tx-detail-group {
+ border-bottom: 1px solid var(--color-border-light);
+ padding-bottom: 0.5rem;
+ margin-bottom: 0.5rem;
+ padding-top: 0.25rem;
+}
diff --git a/src/popup/views/transactionDetail.js b/src/popup/views/transactionDetail.js
index f7fcee4..80ec0e3 100644
--- a/src/popup/views/transactionDetail.js
+++ b/src/popup/views/transactionDetail.js
@@ -190,7 +190,9 @@ function render() {
const rawDataSection = $("tx-detail-rawdata-section");
if (rawDataSection) rawDataSection.classList.add("hidden");
- // Hide on-chain detail sections until populated
+ // Hide on-chain detail sections (and their group wrapper) until populated
+ const onchainGroup = $("tx-detail-onchain-group");
+ if (onchainGroup) onchainGroup.classList.add("hidden");
for (const id of [
"tx-detail-block-section",
"tx-detail-nonce-section",
@@ -285,6 +287,24 @@ function populateOnChainDetails(txData) {
);
}
+ // Show the on-chain details group if any child section is visible
+ const onchainGroup = $("tx-detail-onchain-group");
+ if (onchainGroup) {
+ const hasVisible = [
+ "tx-detail-block-section",
+ "tx-detail-nonce-section",
+ "tx-detail-fee-section",
+ "tx-detail-gasprice-section",
+ "tx-detail-gasused-section",
+ ].some((id) => {
+ const el = $(id);
+ return el && !el.classList.contains("hidden");
+ });
+ if (hasVisible) {
+ onchainGroup.classList.remove("hidden");
+ }
+ }
+
// Bind copy handlers for newly added elements
for (const id of [
"tx-detail-block-section",