fix: show own labelled address for swap transactions (closes #55) #57
Reference in New Issue
Block a user
Delete Branch "fix/55-swap-tx-address"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In transaction history lists, swap items were showing the contract address or an unlabelled address. This changes both
home.jsandaddressDetail.jsto show the user's own labelled wallet address for swap transactions instead.Closes #55
Reviewed.
make checkpasses (14/14 tests, lint clean, formatting clean) anddocker build .succeeds.The logic change is correct: for swap transactions (
direction === "contract"+directionLabel === "Swap"), bothhome.jsandaddressDetail.jsnow showtx.from(the user's own wallet) instead oftx.to(the contract/router address). Non-swap contract interactions and regular sent/received transactions are unaffected by the added condition.Marked
merge-ready.