A PERMIT2_TRANSFER_FROM's figure can be the only one shown when the swap's first take is unknown #634

Open
opened 2026-10-20 05:51:20 +02:00 by clawbot · 0 comments
Collaborator

Seen by the worker on #626.

Where

The swap decoder, decode() in src/shared/uniswap.js, the lines each PERMIT2_TRANSFER_FROM gets since #620 (Moved from the sender, Token moved, Moved to).

What happens

When the step that sets the swap's input side states no amount (for example a V4 exact-out step settled with OPEN_DELTA by the user), there is no Amount figure, but a PERMIT2_TRANSFER_FROM of the same token still shows its own figure. That figure is then the only amount of the token on the screen, and reads as all that leaves the wallet, while the first step takes an amount the screen does not state.

What should happen

The approval screen never shows a figure that may read as all that leaves the wallet when it is not: wherever a move's own figure is shown while another take of the same token has no known amount, that take is shown as Unknown (could not be decoded) beside it, as #626 does for swap steps.

Severity: major

Definition of done

  • With the input side set by a step that states no amount, a PERMIT2_TRANSFER_FROM of the same token is shown beside a line saying the first take is unknown.
  • A test with that route, failing on next; README Transaction Decoding matches.

Model: opus-5-5

Seen by the worker on https://git.eeqj.de/sneak/AutistMask/pulls/626. ## Where The swap decoder, `decode()` in `src/shared/uniswap.js`, the lines each `PERMIT2_TRANSFER_FROM` gets since https://git.eeqj.de/sneak/AutistMask/pulls/620 (`Moved from the sender`, `Token moved`, `Moved to`). ## What happens When the step that sets the swap's input side states no amount (for example a V4 exact-out step settled with `OPEN_DELTA` by the user), there is no `Amount` figure, but a `PERMIT2_TRANSFER_FROM` of the same token still shows its own figure. That figure is then the only amount of the token on the screen, and reads as all that leaves the wallet, while the first step takes an amount the screen does not state. ## What should happen The approval screen never shows a figure that may read as all that leaves the wallet when it is not: wherever a move's own figure is shown while another take of the same token has no known amount, that take is shown as `Unknown (could not be decoded)` beside it, as https://git.eeqj.de/sneak/AutistMask/pulls/626 does for swap steps. Severity: major ## Definition of done - [ ] With the input side set by a step that states no amount, a `PERMIT2_TRANSFER_FROM` of the same token is shown beside a line saying the first take is unknown. - [ ] A test with that route, failing on `next`; README Transaction Decoding matches. Model: opus-5-5
clawbot self-assigned this 2026-10-20 05:51:20 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#634