From aaeb38d7c664f465cc20bbf2ceb54e04df20bb0b Mon Sep 17 00:00:00 2001 From: user Date: Fri, 27 Feb 2026 13:00:07 -0800 Subject: [PATCH] fix: show Swap type label and heading on transaction detail page --- src/popup/index.html | 8 +++++++- src/popup/views/transactionDetail.js | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/popup/index.html b/src/popup/index.html index 78fae1a..e0c6130 100644 --- a/src/popup/index.html +++ b/src/popup/index.html @@ -920,7 +920,13 @@ > < Back -

Transaction

+

+ Transaction +

+
Status
diff --git a/src/popup/views/transactionDetail.js b/src/popup/views/transactionDetail.js index 04c9859..70d4af2 100644 --- a/src/popup/views/transactionDetail.js +++ b/src/popup/views/transactionDetail.js @@ -129,6 +129,21 @@ function render() { nativeEl.parentElement.classList.add("hidden"); } + // Show type label for contract interactions (Swap, Execute, etc.) + const typeSection = $("tx-detail-type-section"); + const typeEl = $("tx-detail-type"); + const headingEl = $("tx-detail-heading"); + if (tx.direction === "contract" && tx.directionLabel) { + if (typeSection) { + typeEl.textContent = tx.directionLabel; + typeSection.classList.remove("hidden"); + } + if (headingEl) headingEl.textContent = tx.directionLabel; + } else { + if (typeSection) typeSection.classList.add("hidden"); + if (headingEl) headingEl.textContent = "Transaction"; + } + // Hide calldata section by default; loadCalldata will show it if needed const calldataSection = $("tx-detail-calldata-section"); if (calldataSection) calldataSection.classList.add("hidden");