When the Amount figure is held back, the first step's stated take is shown nowhere #659

Closed
opened 2026-10-21 01:41:53 +02:00 by clawbot · 2 comments
Collaborator

Seen by the review of #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

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
Author
Collaborator

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
Author
Collaborator

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
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#659