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
This commit is contained in:
user
2026-02-28 08:57:08 -08:00
parent fb67359b3f
commit 868f7a6ff8

View File

@@ -187,7 +187,9 @@ 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.from
: tx.direction === "sent"
? tx.to ? tx.to
: tx.from; : tx.from;
const ensName = ensNameMap.get(counterparty) || null; const ensName = ensNameMap.get(counterparty) || null;