The swap decoder, decode() in src/shared/uniswap.js: the lines given when the Amount figure is held back.
What happens
When some step leaves the Amount figure unknown (a step the decoder cannot read, an unreadable permit), the amount the step that sets the input side does state appears on no line, while later takes keep their own lines. An unreadable permit, then a swap of 600 USDT paid by the user, then a swap of 400 DAI paid by the user, shows only Moved from the sender: 400.0000 DAI: the 600 USDT that leaves is not shown anywhere.
What should happen
Every amount of the user's tokens the decoder does read is shown: when the Amount figure is held back, the first step's stated take gets a Moved from the sender line of its own, as later takes do, beside the line saying what could not be read.
Severity: major
Definition of done
With the Amount figure held back, the take the input-side step states is shown on its own lines.
A test with the route above, failing on next.
Model: opus-5-5
Seen by the review of https://git.eeqj.de/sneak/AutistMask/pulls/656.
## Where
The swap decoder, `decode()` in `src/shared/uniswap.js`: the lines given when the `Amount` figure is held back.
## What happens
When some step leaves the `Amount` figure unknown (a step the decoder cannot read, an unreadable permit), the amount the step that sets the input side does state appears on no line, while later takes keep their own lines. An unreadable permit, then a swap of 600 USDT paid by the user, then a swap of 400 DAI paid by the user, shows only `Moved from the sender: 400.0000 DAI`: the 600 USDT that leaves is not shown anywhere.
## What should happen
Every amount of the user's tokens the decoder does read is shown: when the `Amount` figure is held back, the first step's stated take gets a `Moved from the sender` line of its own, as later takes do, beside the line saying what could not be read.
Severity: major
## Definition of done
- [ ] With the `Amount` figure held back, the take the input-side step states is shown on its own lines.
- [ ] A test with the route above, failing on `next`.
Model: opus-5-5
clawbot
self-assigned this 2026-10-21 01:41:53 +02:00
Plan: one PR to next, in decode() in src/shared/uniswap.js, where the Amount line and the lines of other takes are formed after the loop. Whenever the Amount figure is held back, the take that the step setting the input side states (a quantity) gets Moved from the sender lines of its own, as later takes do, beside the line saying what could not be read; a take with no stated amount keeps its Unknown (could not be decoded) line. Tests with the issue's route and with an unread step after a single swap, each failing on next; routes where the Amount figure stands read as on next.
Model: opus-5-5
Plan: one PR to `next`, in `decode()` in `src/shared/uniswap.js`, where the `Amount` line and the lines of other takes are formed after the loop. Whenever the `Amount` figure is held back, the take that the step setting the input side states (a quantity) gets `Moved from the sender` lines of its own, as later takes do, beside the line saying what could not be read; a take with no stated amount keeps its `Unknown (could not be decoded)` line. Tests with the issue's route and with an unread step after a single swap, each failing on `next`; routes where the `Amount` figure stands read as on `next`.
Model: opus-5-5
Built in #662: when there is no Amount line, the amount the step that sets the input side states, and each later take of Token In the total added to it, now get Moved from the sender lines of their own, ahead of the other takes. Routes with an Amount line read as before.
Model: opus-5-5
Built in https://git.eeqj.de/sneak/AutistMask/pulls/662: when there is no `Amount` line, the amount the step that sets the input side states, and each later take of `Token In` the total added to it, now get `Moved from the sender` lines of their own, ahead of the other takes. Routes with an `Amount` line 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 review of #656.
Where
The swap decoder,
decode()insrc/shared/uniswap.js: the lines given when theAmountfigure is held back.What happens
When some step leaves the
Amountfigure unknown (a step the decoder cannot read, an unreadable permit), the amount the step that sets the input side does state appears on no line, while later takes keep their own lines. An unreadable permit, then a swap of 600 USDT paid by the user, then a swap of 400 DAI paid by the user, shows onlyMoved from the sender: 400.0000 DAI: the 600 USDT that leaves is not shown anywhere.What should happen
Every amount of the user's tokens the decoder does read is shown: when the
Amountfigure is held back, the first step's stated take gets aMoved from the senderline of its own, as later takes do, beside the line saying what could not be read.Severity: major
Definition of done
Amountfigure held back, the take the input-side step states is shown on its own lines.next.Model: opus-5-5
Plan: one PR to
next, indecode()insrc/shared/uniswap.js, where theAmountline and the lines of other takes are formed after the loop. Whenever theAmountfigure is held back, the take that the step setting the input side states (a quantity) getsMoved from the senderlines of its own, as later takes do, beside the line saying what could not be read; a take with no stated amount keeps itsUnknown (could not be decoded)line. Tests with the issue's route and with an unread step after a single swap, each failing onnext; routes where theAmountfigure stands read as onnext.Model: opus-5-5
Built in #662: when there is no
Amountline, the amount the step that sets the input side states, and each later take ofToken Inthe total added to it, now getMoved from the senderlines of their own, ahead of the other takes. Routes with anAmountline read as before.Model: opus-5-5