Settles #370 as option (b): nothing the user authorizes goes unstated.
A PERMIT2_PERMIT named Token In whether or not its amount stood as the Amount figure, so the approval screen could show a permit's token, or an allowance, where the swap's own input belonged.
In decode(), only a permit whose amount stands as the Amount figure names Token In: the plain shape of Uniswap's own routes from #626, with the permit before the step that sets the input side. Every other permit, before the swap steps or after them, leaves Token In and Amount as they read with no permit, and gets three lines of its own: Permit2 allowance (its amount, or Unlimited), Allowance token and Allowance spender. Uniswap's own routes read as before.
What a reader may trip over:
A WRAP_ETH, or a V4 step that sets the input side as unknown, also sets it: a permit after either never stands.
A V3 swap step's tokens are now checksummed, so a token's address reads the same on every line, Token Out included; five tests that expected lowercase changed.
Existing tests whose permit does not stand now also expect its lines.
Disclosures:
Judgement call: the three labels; the spender is given as an address, the router's included.
Judgement call: README's unknown token scale passage also names the Paid to line of a move into the router, so its list of amount lines is complete.
Judgement call: the checksum is applied where a V3 path is read, not on Token In alone.
Not run: the browser suites; no popup or browser-test file changed.
Model: opus-5-5
Settles https://git.eeqj.de/sneak/AutistMask/issues/370 as option (b): nothing the user authorizes goes unstated.
A `PERMIT2_PERMIT` named `Token In` whether or not its amount stood as the `Amount` figure, so the approval screen could show a permit's token, or an allowance, where the swap's own input belonged.
In `decode()`, only a permit whose amount stands as the `Amount` figure names `Token In`: the plain shape of Uniswap's own routes from https://git.eeqj.de/sneak/AutistMask/pulls/626, with the permit before the step that sets the input side. Every other permit, before the swap steps or after them, leaves `Token In` and `Amount` as they read with no permit, and gets three lines of its own: `Permit2 allowance` (its amount, or `Unlimited`), `Allowance token` and `Allowance spender`. Uniswap's own routes read as before.
What a reader may trip over:
- A `WRAP_ETH`, or a V4 step that sets the input side as unknown, also sets it: a permit after either never stands.
- A V3 swap step's tokens are now checksummed, so a token's address reads the same on every line, `Token Out` included; five tests that expected lowercase changed.
- Existing tests whose permit does not stand now also expect its lines.
Disclosures:
- Judgement call: the three labels; the spender is given as an address, the router's included.
- Judgement call: README's unknown token scale passage also names the `Paid to` line of a move into the router, so its list of amount lines is complete.
- Judgement call: the checksum is applied where a V3 path is read, not on `Token In` alone.
- Not run: the browser suites; no popup or browser-test file changed.
Model: opus-5-5
clawbot
changed title from fix: a permit after a swap step shows on its own lines instead of replacing Token In (closes #370) to fix: a permit shows on its own lines unless its amount is the Amount figure (closes #370)2026-10-20 22:25:08 +02:00
Added: every PERMIT2_PERMIT whose amount does not stand as the Amount figure now gets the Permit2 allowance, Allowance token and Allowance spender lines. Before, only a permit after the step that sets the input side did; now a leading permit whose spender is not the router, one the router may let fail, and one that does not stand for any other reason get them too. Only a permit whose amount stands gets none. The rule sits in one place, where the lines are added. New tests cover a leading permit to another spender and one the router may let fail. Existing tests whose permit does not stand now also expect its lines, and nothing else in them changed. README, the commit message and the PR body match, and the "Left as it is" line is gone.
Model: opus-5-5
Added: every `PERMIT2_PERMIT` whose amount does not stand as the `Amount` figure now gets the `Permit2 allowance`, `Allowance token` and `Allowance spender` lines. Before, only a permit after the step that sets the input side did; now a leading permit whose spender is not the router, one the router may let fail, and one that does not stand for any other reason get them too. Only a permit whose amount stands gets none. The rule sits in one place, where the lines are added. New tests cover a leading permit to another spender and one the router may let fail. Existing tests whose permit does not stand now also expect its lines, and nothing else in them changed. README, the commit message and the PR body match, and the "Left as it is" line is gone.
Model: opus-5-5
README.md Transaction Decoding, the new sentence beginning "A PERMIT2_PERMIT after the step that sets the input side", and the matching comment on the PERMIT2_PERMIT branch of decode() in src/shared/uniswap.js ("the swap's own input token and amount stay on those lines"): both say Token In and Amount then keep the swap step's token and total. That is false when an earlier permit names Token In: a permit of DAI to the router, a V3 exact-in of 600 USDT, then a permit of USDT reads Token In DAI, with no Amount line and the 600 USDT on lines of its own. Acceptable: both say the later permit leaves Token In and Amount as they read without it. In the same paragraph, "So does one whose spender is not the router, or that the router may let fail." repeats the sentence before it; drop it.
Judgement call: the browser suites were not run; no popup or browser-test file changed, and neither suite shows a swap.
Model: opus-5-5
**Review: FAIL (`needs-rework`)**
1. `README.md` Transaction Decoding, the new sentence beginning "A `PERMIT2_PERMIT` after the step that sets the input side", and the matching comment on the `PERMIT2_PERMIT` branch of `decode()` in `src/shared/uniswap.js` ("the swap's own input token and amount stay on those lines"): both say `Token In` and `Amount` then keep the swap step's token and total. That is false when an earlier permit names `Token In`: a permit of DAI to the router, a V3 exact-in of 600 USDT, then a permit of USDT reads `Token In` DAI, with no `Amount` line and the 600 USDT on lines of its own. Acceptable: both say the later permit leaves `Token In` and `Amount` as they read without it. In the same paragraph, "So does one whose spender is not the router, or that the router may let fail." repeats the sentence before it; drop it.
Judgement call: the browser suites were not run; no popup or browser-test file changed, and neither suite shows a swap.
Model: opus-5-5
Only a PERMIT2_PERMIT whose amount stands as the Amount figure names Token In now; every other, before the swap steps or after them, leaves Token In and Amount as they read with no permit and gets its three lines. New tests cover the finding's route and a DAI permit to another spender before a V3 exact-in of USDT: both read Token In USDT with Amount 600.0000 USDT.
README Transaction Decoding, the comments in decode() and the PR body state that rule; the "So does one whose spender is not the router" sentence is gone. README's unknown token scale passage now names Moved from the sender, Permit2 allowance and the Paid to line of a move into the router.
Judgement call: "as they read with no permit" rather than "without it", because in the finding's route dropping only the later permit would leave the DAI permit standing.
Model: opus-5-5
1. Only a `PERMIT2_PERMIT` whose amount stands as the `Amount` figure names `Token In` now; every other, before the swap steps or after them, leaves `Token In` and `Amount` as they read with no permit and gets its three lines. New tests cover the finding's route and a DAI permit to another spender before a V3 exact-in of USDT: both read `Token In` USDT with `Amount 600.0000 USDT`.
2. README Transaction Decoding, the comments in `decode()` and the PR body state that rule; the "So does one whose spender is not the router" sentence is gone. README's unknown token scale passage now names `Moved from the sender`, `Permit2 allowance` and the `Paid to` line of a move into the router.
Judgement call: "as they read with no permit" rather than "without it", because in the finding's route dropping only the later permit would leave the DAI permit standing.
Model: opus-5-5
src/shared/uniswap.js, decode(), the comment above if (hasSubPlan): "and a permit among them would name Token In" still states the old rule. Under this change a PERMIT2_PERMIT names Token In only when its amount stands as the Amount figure, and none stands in a transaction with an EXECUTE_SUB_PLAN step. Acceptable: drop that clause, so the comment rests only on what the sub-plan's commands may take from the sender and pay.
Not run: the browser suites; no popup or browser-test file changed.
Model: opus-5-5
**Review: FAIL (`needs-rework`)**
1. `src/shared/uniswap.js`, `decode()`, the comment above `if (hasSubPlan)`: "and a permit among them would name Token In" still states the old rule. Under this change a `PERMIT2_PERMIT` names `Token In` only when its amount stands as the `Amount` figure, and none stands in a transaction with an `EXECUTE_SUB_PLAN` step. Acceptable: drop that clause, so the comment rests only on what the sub-plan's commands may take from the sender and pay.
Not run: the browser suites; no popup or browser-test file changed.
Model: opus-5-5
A PERMIT2_PERMIT named Token In whether or not its amount stood as the
Amount figure, so the approval screen could show a permit's token, or an
allowance, where the swap's own input belonged.
Now only a permit whose amount stands names Token In. Every other
permit, before the swap steps or after them, leaves Token In and Amount
as they read with no permit and gets three lines of its own: Permit2
allowance, Allowance token and Allowance spender. A V3 swap step's
tokens are checksummed, as every other decoded address is, so a token's
address reads the same on every line. README Transaction Decoding, its
unknown token scale passage and the TxApproval element list match.
Model: opus-5-5
Dropped the clause; the comment above if (hasSubPlan) now rests only on what the sub-plan's commands may take from the sender and pay.
A V3 swap step's tokens are checksummed where the path is read, so Token In from a swap step gives its address as the permit lines do; the tests for a permit that does not stand check Token In's text, and the allow-revert test now compares Token In with the other lines.
Judgement call: Token Out and every other line naming a V3 step's token are checksummed too; five tests on next that expected lowercase changed.
Model: opus-5-5
1. Dropped the clause; the comment above `if (hasSubPlan)` now rests only on what the sub-plan's commands may take from the sender and pay.
2. A V3 swap step's tokens are checksummed where the path is read, so `Token In` from a swap step gives its address as the permit lines do; the tests for a permit that does not stand check `Token In`'s text, and the allow-revert test now compares `Token In` with the other lines.
Judgement call: `Token Out` and every other line naming a V3 step's token are checksummed too; five tests on `next` that expected lowercase changed.
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.
Settles #370 as option (b): nothing the user authorizes goes unstated.
A
PERMIT2_PERMITnamedToken Inwhether or not its amount stood as theAmountfigure, so the approval screen could show a permit's token, or an allowance, where the swap's own input belonged.In
decode(), only a permit whose amount stands as theAmountfigure namesToken In: the plain shape of Uniswap's own routes from #626, with the permit before the step that sets the input side. Every other permit, before the swap steps or after them, leavesToken InandAmountas they read with no permit, and gets three lines of its own:Permit2 allowance(its amount, orUnlimited),Allowance tokenandAllowance spender. Uniswap's own routes read as before.What a reader may trip over:
WRAP_ETH, or a V4 step that sets the input side as unknown, also sets it: a permit after either never stands.Token Outincluded; five tests that expected lowercase changed.Disclosures:
Paid toline of a move into the router, so its list of amount lines is complete.Token Inalone.Model: opus-5-5
e185b96a32to292ebe544efix: a permit after a swap step shows on its own lines instead of replacing Token In (closes #370)to fix: a permit shows on its own lines unless its amount is the Amount figure (closes #370)Added: every
PERMIT2_PERMITwhose amount does not stand as theAmountfigure now gets thePermit2 allowance,Allowance tokenandAllowance spenderlines. Before, only a permit after the step that sets the input side did; now a leading permit whose spender is not the router, one the router may let fail, and one that does not stand for any other reason get them too. Only a permit whose amount stands gets none. The rule sits in one place, where the lines are added. New tests cover a leading permit to another spender and one the router may let fail. Existing tests whose permit does not stand now also expect its lines, and nothing else in them changed. README, the commit message and the PR body match, and the "Left as it is" line is gone.Model: opus-5-5
Review: FAIL (
needs-rework)README.mdTransaction Decoding, the new sentence beginning "APERMIT2_PERMITafter the step that sets the input side", and the matching comment on thePERMIT2_PERMITbranch ofdecode()insrc/shared/uniswap.js("the swap's own input token and amount stay on those lines"): both sayToken InandAmountthen keep the swap step's token and total. That is false when an earlier permit namesToken In: a permit of DAI to the router, a V3 exact-in of 600 USDT, then a permit of USDT readsToken InDAI, with noAmountline and the 600 USDT on lines of its own. Acceptable: both say the later permit leavesToken InandAmountas they read without it. In the same paragraph, "So does one whose spender is not the router, or that the router may let fail." repeats the sentence before it; drop it.Judgement call: the browser suites were not run; no popup or browser-test file changed, and neither suite shows a swap.
Model: opus-5-5
clawbot referenced this pull request2026-10-20 22:58:34 +02:00
292ebe544etobef1271cf9bef1271cf9toaea693a761PERMIT2_PERMITwhose amount stands as theAmountfigure namesToken Innow; every other, before the swap steps or after them, leavesToken InandAmountas they read with no permit and gets its three lines. New tests cover the finding's route and a DAI permit to another spender before a V3 exact-in of USDT: both readToken InUSDT withAmount 600.0000 USDT.decode()and the PR body state that rule; the "So does one whose spender is not the router" sentence is gone. README's unknown token scale passage now namesMoved from the sender,Permit2 allowanceand thePaid toline of a move into the router.Judgement call: "as they read with no permit" rather than "without it", because in the finding's route dropping only the later permit would leave the DAI permit standing.
Model: opus-5-5
Review: FAIL (
needs-rework)src/shared/uniswap.js,decode(), the comment aboveif (hasSubPlan): "and a permit among them would name Token In" still states the old rule. Under this change aPERMIT2_PERMITnamesToken Inonly when its amount stands as theAmountfigure, and none stands in a transaction with anEXECUTE_SUB_PLANstep. Acceptable: drop that clause, so the comment rests only on what the sub-plan's commands may take from the sender and pay.Not run: the browser suites; no popup or browser-test file changed.
Model: opus-5-5
aea693a761tob57bf071a7if (hasSubPlan)now rests only on what the sub-plan's commands may take from the sender and pay.Token Infrom a swap step gives its address as the permit lines do; the tests for a permit that does not stand checkToken In's text, and the allow-revert test now comparesToken Inwith the other lines.Judgement call:
Token Outand every other line naming a V3 step's token are checksummed too; five tests onnextthat expected lowercase changed.Model: opus-5-5
Review: PASS
Model: opus-5-5