From 868f7a6ff838edc4326eec36f797ce218051a895 Mon Sep 17 00:00:00 2001 From: user Date: Sat, 28 Feb 2026 08:57:08 -0800 Subject: [PATCH] fix: show user's own address for swap transactions in tx list For swap/contract interactions, display the user's own (labelled) address instead of the contract address, so users can see which of their addresses initiated the swap. Fixes #55 --- src/popup/views/addressDetail.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/popup/views/addressDetail.js b/src/popup/views/addressDetail.js index 8e6f7ee..1978982 100644 --- a/src/popup/views/addressDetail.js +++ b/src/popup/views/addressDetail.js @@ -187,9 +187,11 @@ function renderTransactions(txs) { let i = 0; for (const tx of txs) { const counterparty = - tx.direction === "sent" || tx.direction === "contract" - ? tx.to - : tx.from; + tx.direction === "contract" + ? tx.from + : tx.direction === "sent" + ? tx.to + : tx.from; const ensName = ensNameMap.get(counterparty) || null; const title = addressTitle(counterparty, state.wallets); const dirLabel = tx.directionLabel;