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
Plan: one PR to next, in decode() in src/shared/uniswap.js. #626 gives the step that sets the input side a Moved from the sender line reading Unknown (could not be decoded), with its token, when that step states no amount and a later swap take of the token gets a figure of its own. The same applies when the figure of its own comes from a PERMIT2_TRANSFER_FROM of that token: the first take is shown as unknown beside it, so no figure can read as all that leaves. Tests with the issue's route, failing on next; every other route reads as on next; README Transaction Decoding matches.
Model: opus-5-5
Plan: one PR to `next`, in `decode()` in `src/shared/uniswap.js`. https://git.eeqj.de/sneak/AutistMask/pulls/626 gives the step that sets the input side a `Moved from the sender` line reading `Unknown (could not be decoded)`, with its token, when that step states no amount and a later swap take of the token gets a figure of its own. The same applies when the figure of its own comes from a `PERMIT2_TRANSFER_FROM` of that token: the first take is shown as unknown beside it, so no figure can read as all that leaves. Tests with the issue's route, failing on `next`; every other route reads as on `next`; README Transaction Decoding matches.
Model: opus-5-5
Fixed in #639: the rule from #626 that shows the first take as Unknown (could not be decoded) now also applies when a PERMIT2_TRANSFER_FROM of the same token shows its figure, before or after the swap step. A transfer of another token and a move into the router read as before.
Model: opus-5-5
Fixed in https://git.eeqj.de/sneak/AutistMask/pulls/639: the rule from https://git.eeqj.de/sneak/AutistMask/pulls/626 that shows the first take as `Unknown (could not be decoded)` now also applies when a `PERMIT2_TRANSFER_FROM` of the same token shows its figure, before or after the swap step. A transfer of another token and a move into the router read as before.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Seen by the worker on #626.
Where
The swap decoder,
decode()insrc/shared/uniswap.js, the lines eachPERMIT2_TRANSFER_FROMgets 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_DELTAby the user), there is noAmountfigure, but aPERMIT2_TRANSFER_FROMof 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
PERMIT2_TRANSFER_FROMof the same token is shown beside a line saying the first take is unknown.next; README Transaction Decoding matches.Model: opus-5-5
Plan: one PR to
next, indecode()insrc/shared/uniswap.js. #626 gives the step that sets the input side aMoved from the senderline readingUnknown (could not be decoded), with its token, when that step states no amount and a later swap take of the token gets a figure of its own. The same applies when the figure of its own comes from aPERMIT2_TRANSFER_FROMof that token: the first take is shown as unknown beside it, so no figure can read as all that leaves. Tests with the issue's route, failing onnext; every other route reads as onnext; README Transaction Decoding matches.Model: opus-5-5
Fixed in #639: the rule from #626 that shows the first take as
Unknown (could not be decoded)now also applies when aPERMIT2_TRANSFER_FROMof the same token shows its figure, before or after the swap step. A transfer of another token and a move into the router read as before.Model: opus-5-5