fix: the approval screen names the address a swap's output is paid to (closes #594)
check / check (push) Canceled after 0s
e2e / e2e-chrome (push) Canceled after 0s
e2e / e2e-firefox (push) Canceled after 0s

The swap decoder read no recipient, so a swap paying its output to another
address still showed Min. received. It now reads the recipient of every swap
step, SWEEP, UNWRAP_WETH, V4 TAKE and TAKE_ALL, reads the router's
placeholders as the router does (address(1) is the sender, address(2) the
router, which holds the output until a later SWEEP or UNWRAP_WETH pays it
out), and compares the result with the transaction's sender. When the output
goes anywhere else, a Paid to line names each address it is paid to and the
minimum reads Min. paid out. The approval and transaction detail screens pass
the sender in.

Model: opus-5-5
This commit is contained in:
2026-10-19 06:06:38 +00:00
parent 1f5cdeb7b4
commit 426f3e0d9a
10 changed files with 828 additions and 69 deletions
+3 -1
View File
@@ -316,11 +316,13 @@ async function loadFullTxDetails(txHash, chainId) {
// Decoded against the address the transaction was sent to, as the
// explorer reports it, not the history entry's `to`: for a token
// transfer that is the transfer's recipient, not the token contract.
// On the active network, the one whose explorer was just asked.
// On the active network, the one whose explorer was just asked, and
// from the sender it reports.
const decoded = decodeCalldata(
inputData,
txData.to?.hash || "",
currentNetwork().chainId,
txData.from?.hash || "",
);
if (decoded) {
// Render decoded calldata matching approval view style