fix: history calls an execute or multicall a Swap only when sent to a router (closes #580) #643

Merged
clawbot merged 1 commits from issue-580-swap-label-router-only into next 2026-10-20 17:19:43 +02:00
Collaborator

Fixes #580.

In history (parseTx() in src/shared/transactions.js), a call named execute or multicall is labelled Swap only when it was sent to a Universal Router address listed for the network the transaction is on. That is the transaction's own chain id, not the active network. The check uses routerRelease(), now exported from src/shared/uniswap.js, so it is the same list the approval screen decodes swaps for. Any other such call is labelled by its method name (Execute, Multicall). TransactionDetail's Type line reads that label, so it shows Contract Call. The named router swap methods (swap, swapExactTokensForTokens and the rest) keep their label wherever they were sent.

What the diff does not show:

  • Such a call's history row now names the contract it was sent to as the counterparty, as other contract calls do, instead of the user's own address.
  • A multicall to Uniswap's older SwapRouter02 now reads Multicall and Contract Call: only Universal Router addresses are on the list, as the issue asks.

The tests in tests/uniswapRouterAddress.test.js build each row with the real history parser and open it on TransactionDetail. Each method is sent to a router on its network, to another contract, and to a router of the other network only. README's TransactionDetail Type bullet states the rule.

Judgement call: swap stays a Swap wherever it was sent, although other contracts use that name too; the plan keeps it out of this issue.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/AutistMask/issues/580. In history (`parseTx()` in `src/shared/transactions.js`), a call named `execute` or `multicall` is labelled Swap only when it was sent to a Universal Router address listed for the network the transaction is on. That is the transaction's own chain id, not the active network. The check uses `routerRelease()`, now exported from `src/shared/uniswap.js`, so it is the same list the approval screen decodes swaps for. Any other such call is labelled by its method name (`Execute`, `Multicall`). TransactionDetail's Type line reads that label, so it shows Contract Call. The named router swap methods (`swap`, `swapExactTokensForTokens` and the rest) keep their label wherever they were sent. What the diff does not show: - Such a call's history row now names the contract it was sent to as the counterparty, as other contract calls do, instead of the user's own address. - A `multicall` to Uniswap's older SwapRouter02 now reads `Multicall` and Contract Call: only Universal Router addresses are on the list, as the issue asks. The tests in `tests/uniswapRouterAddress.test.js` build each row with the real history parser and open it on TransactionDetail. Each method is sent to a router on its network, to another contract, and to a router of the other network only. README's TransactionDetail Type bullet states the rule. Judgement call: `swap` stays a Swap wherever it was sent, although other contracts use that name too; the plan keeps it out of this issue. Model: opus-5-5
clawbot added the needs-review label 2026-10-20 16:32:07 +02:00
clawbot self-assigned this 2026-10-20 16:32:07 +02:00
clawbot added 1 commit 2026-10-20 16:32:08 +02:00
fix: history calls an execute or multicall a Swap only when sent to a router (closes #580)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
d34fb1976f
The history labelled any call named execute or multicall a Swap, whatever
contract it went to, so a multisig or smart account call showed as a Swap
in the list and on TransactionDetail's Type line. Such a call is now a Swap
only when sent to a Universal Router address listed for the network the
transaction is on, the list the approval screen uses (routerRelease(), now
exported from uniswap.js). Any other is labelled by its method name and its
Type line reads Contract Call. The named router swap methods keep their
label.

Model: opus-5-5
Author
Collaborator

Review: PASS

Model: opus-5-5

**Review: PASS** Model: opus-5-5
clawbot merged commit 4472746b89 into next 2026-10-20 17:19:43 +02:00
clawbot deleted branch issue-580-swap-label-router-only 2026-10-20 17:19:45 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#643