fix: with no Amount line, the takes the total adds up get lines of their own (closes #659)
check / check (push) Canceled after 0s
e2e / e2e-chrome (push) Canceled after 0s
e2e / e2e-firefox (push) Canceled after 0s

When a step this decoder cannot read, an unreadable permit, or a take
of Token In with an unknown amount held back the Amount line, the
amount the step that sets the input side states, and each later take
of Token In added to it, appeared on no line, while other takes kept
their own Moved from the sender lines. Those takes now get the same
lines, first. Routes with an Amount line read as before.

Model: opus-5-5
This commit is contained in:
clawbot
2026-10-21 01:28:13 +00:00
parent 5f2b606754
commit 5a444781bc
4 changed files with 124 additions and 20 deletions
+16 -10
View File
@@ -3251,7 +3251,12 @@ Currently supported:
of a token other than `Token In`; one of `Token In` after an amount that is
not a quantity (a V4 open delta, `ALREADY_PAID`, which keep their wording on
the `Amount` line, or no stated amount, as of a V4 exact-out step); and one
whose amount the decoder does not know. When the step that sets the input side
whose amount the decoder does not know. When there is no `Amount` line, each
take the total counts gets them too, so that every amount the decoder reads is
shown: the amount the step that sets the input side states, when it is a
quantity, and each later take of `Token In` added to it. A `PERMIT2_PERMIT`
the decoder cannot read, then V3 exact-ins of 600 USDT and 400 DAI paid by the
user, give lines for both amounts. When the step that sets the input side
states no amount, the user pays it some of its input token, and there is no
`Amount` line, that step gets them too whenever another take's lines give a
figure, or a `PERMIT2_TRANSFER_FROM` of its token gives one, on the lines
@@ -3259,15 +3264,16 @@ Currently supported:
as all that leaves. When it states no amount and the user pays it none of its
input token, as when the router pays it, that step takes none of that token
from the user's wallet and never gets them, with a permit or without. They
come in step order, the step that sets the input side first when it has them:
`Moved from the sender`, its amount, worded as the `Amount` line words one, or
`Unknown (could not be decoded)` when the decoder does not know it;
`Token moved`, giving the token's address as the `Token In` line does; and
`Moved to`, which reads `The swap step that spends it`. A token the decoder
does not know gives the `Moved from the sender` line alone. A step may also
take from the user's wallet what the decoder did not read: a V4 step whose
input or one of whose `SETTLE`s or `SETTLE_ALL`s it cannot read, which the
router still runs; a V2 or V3 exact-in or exact-out step or a
come in step order, except that the step that sets the input side comes first
when it has them, followed, when there is no `Amount` line, by the other takes
the total counts: `Moved from the sender`, its amount, worded as the `Amount`
line words one, or `Unknown (could not be decoded)` when the decoder does not
know it; `Token moved`, giving the token's address as the `Token In` line
does; and `Moved to`, which reads `The swap step that spends it`. A token the
decoder does not know gives the `Moved from the sender` line alone. A step may
also take from the user's wallet what the decoder did not read: a V4 step
whose input or one of whose `SETTLE`s or `SETTLE_ALL`s it cannot read, which
the router still runs; a V2 or V3 exact-in or exact-out step or a
`PERMIT2_TRANSFER_FROM` whose input it cannot read, such as a V3 step whose
path is shorter than one token address or has bytes after its last hop; every
`PERMIT2_TRANSFER_FROM_BATCH`; every `EXECUTE_SUB_PLAN`, wherever it stands;