Compare commits

...

1 Commits

Author SHA1 Message Date
user
868f7a6ff8 fix: show user's own address for swap transactions in tx list
All checks were successful
check / check (push) Successful in 22s
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
2026-02-28 08:57:08 -08:00

View File

@@ -187,9 +187,11 @@ function renderTransactions(txs) {
let i = 0; let i = 0;
for (const tx of txs) { for (const tx of txs) {
const counterparty = const counterparty =
tx.direction === "sent" || tx.direction === "contract" tx.direction === "contract"
? tx.to ? tx.from
: tx.from; : tx.direction === "sent"
? tx.to
: tx.from;
const ensName = ensNameMap.get(counterparty) || null; const ensName = ensNameMap.get(counterparty) || null;
const title = addressTitle(counterparty, state.wallets); const title = addressTitle(counterparty, state.wallets);
const dirLabel = tx.directionLabel; const dirLabel = tx.directionLabel;