Code that a step runs, such as a V4 pool's hook or a token's own code, can call a spender other than the router, which can then take up to its allowance from the user's wallet before the transaction ends. The Amount figure and Min. received took no account of it.
In decode() in src/shared/uniswap.js:
An allowance of Token In to a spender other than the router leaves no Amount line, through the condition that already held it back for a permit the decoder cannot read. The swap steps' own takes then get Moved from the sender lines, as since #662.
Any allowance to another spender makes the minimum read Min. paid out.
Allowances to the router are unchanged, so Uniswap's own routes read as on next.
README Transaction Decoding matches.
What a reader may trip over:
An allowance of a token other than Token In keeps the Amount line; only the minimum's label changes.
A permit naming a different Universal Router counts as another spender, so the allow-revert test in tests/uniswapRecipient.test.js now expects Min. paid out on the routers it does not name.
Tests whose "another spender" rows encoded the old reading moved into the new test block.
Disclosures:
Judgement call: a permit or batch the decoder cannot read may be to any spender, so it now also makes the minimum read Min. paid out (it already left no Amount line).
Not run: the browser suites; no popup or browser-test file changed.
Model: opus-5-5
Fixes https://git.eeqj.de/sneak/AutistMask/issues/658.
Code that a step runs, such as a V4 pool's hook or a token's own code, can call a spender other than the router, which can then take up to its allowance from the user's wallet before the transaction ends. The `Amount` figure and `Min. received` took no account of it.
In `decode()` in `src/shared/uniswap.js`:
- An allowance of `Token In` to a spender other than the router leaves no `Amount` line, through the condition that already held it back for a permit the decoder cannot read. The swap steps' own takes then get `Moved from the sender` lines, as since https://git.eeqj.de/sneak/AutistMask/pulls/662.
- Any allowance to another spender makes the minimum read `Min. paid out`.
- Allowances to the router are unchanged, so Uniswap's own routes read as on `next`.
README Transaction Decoding matches.
What a reader may trip over:
- An allowance of a token other than `Token In` keeps the `Amount` line; only the minimum's label changes.
- A permit naming a different Universal Router counts as another spender, so the allow-revert test in `tests/uniswapRecipient.test.js` now expects `Min. paid out` on the routers it does not name.
- Tests whose "another spender" rows encoded the old reading moved into the new test block.
Disclosures:
- Judgement call: a permit or batch the decoder cannot read may be to any spender, so it now also makes the minimum read `Min. paid out` (it already left no `Amount` line).
- Not run: the browser suites; no popup or browser-test file changed.
Model: opus-5-5
Code that a step runs, such as a V4 pool's hook, can call a spender other
than the router, which can then take up to its allowance from the user's
wallet before the transaction ends. The Amount figure and Min. received took
no account of it.
In decode(), an allowance of Token In to a spender other than the router
now leaves no Amount line, as an unread permit already did, so the swap
steps' own takes get lines of their own. Any allowance to another spender,
or a permit or batch the decoder cannot read, makes the minimum read
Min. paid out. Permits to 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.
Fixes #658.
Code that a step runs, such as a V4 pool's hook or a token's own code, can call a spender other than the router, which can then take up to its allowance from the user's wallet before the transaction ends. The
Amountfigure andMin. receivedtook no account of it.In
decode()insrc/shared/uniswap.js:Token Into a spender other than the router leaves noAmountline, through the condition that already held it back for a permit the decoder cannot read. The swap steps' own takes then getMoved from the senderlines, as since #662.Min. paid out.next.README Transaction Decoding matches.
What a reader may trip over:
Token Inkeeps theAmountline; only the minimum's label changes.tests/uniswapRecipient.test.jsnow expectsMin. paid outon the routers it does not name.Disclosures:
Min. paid out(it already left noAmountline).Model: opus-5-5
Review: PASS
Model: opus-5-5
clawbot referenced this pull request2026-10-21 06:25:42 +02:00