fix: show user's own address for swap transactions in tx list
All checks were successful
check / check (push) Successful in 22s
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:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user