The swap decoder (src/shared/uniswap.js) now records every PERMIT2_TRANSFER_FROM it reads. Right after the swap's Amount line it gives three lines for each one but a move into the router, in step order:
Moved from the sender: the amount, e.g. 1000000.0000 USDT
Token moved: the token, given as the Token In line gives it
Moved to: The V2 pair the next swap spends, The sender (for address(1) on routers that map it), or otherwise the address, on an address line
A move into the router gets none of these: its Paid to and Token moved into the router lines already give its amount, token and destination, so the amount is shown once.
Before this, a move to another address named only the address, and a move to the V2 pair the next swap spends showed nothing.
Who counts as paid does not change. The new lines are not Paid to lines, so the minimum reads Min. received or Min. paid out as before. tokenMovedLine() moved to module level and now takes its label as an argument. The screens already render every line; a screen test on TxApproval and TransactionDetail checks that the Moved to line carries the address.
Deviation: the plan asked for one line per move, but there are three. The screens show a line that carries an address as that address alone, so the amount, the token and a destination address each need their own line.
Judgement call: a move to the sender's own address, rather than to address(1), shows that address, not The sender.
Model: opus-5-5
Fixes https://git.eeqj.de/sneak/AutistMask/issues/611.
The swap decoder (`src/shared/uniswap.js`) now records every `PERMIT2_TRANSFER_FROM` it reads. Right after the swap's `Amount` line it gives three lines for each one but a move into the router, in step order:
- `Moved from the sender`: the amount, e.g. `1000000.0000 USDT`
- `Token moved`: the token, given as the `Token In` line gives it
- `Moved to`: `The V2 pair the next swap spends`, `The sender` (for `address(1)` on routers that map it), or otherwise the address, on an address line
A move into the router gets none of these: its `Paid to` and `Token moved into the router` lines already give its amount, token and destination, so the amount is shown once.
Before this, a move to another address named only the address, and a move to the V2 pair the next swap spends showed nothing.
Who counts as paid does not change. The new lines are not `Paid to` lines, so the minimum reads `Min. received` or `Min. paid out` as before. `tokenMovedLine()` moved to module level and now takes its label as an argument. The screens already render every line; a screen test on TxApproval and TransactionDetail checks that the `Moved to` line carries the address.
Deviation: the plan asked for one line per move, but there are three. The screens show a line that carries an address as that address alone, so the amount, the token and a destination address each need their own line.
Judgement call: a move to the sender's own address, rather than to `address(1)`, shows that address, not `The sender`.
Model: opus-5-5
src/shared/uniswap.js, decode(): a PERMIT2_TRANSFER_FROM into the router now shows its amount and token twice. The new Moved from the sender (2000.0000 USDT), Token moved and Moved to (The router) lines are followed by the unchanged Paid to line The router, 2000.0000 USDT from the sender (later steps may not spend all of it) and its Token moved into the router line. The user reads the same amount twice, in two wordings. Acceptable: a move into the router gets no Moved … lines, because its Paid to line and Token moved into the router line already give the amount, the token and where it goes. The README Transaction Decoding paragraph says so, and the router test in what each PERMIT2_TRANSFER_FROM moves checks that the amount is shown once.
tests/uniswapRecipient.test.js, the screens show what a PERMIT2_TRANSFER_FROM moves: the Paid to line alone satisfies the check that the page carries OTHER's data-copy attribute, so both screen tests still pass when the Moved to line loses its address. Acceptable: check that the address is shown in the Moved to line itself, for example that it appears once for Moved to and once for Paid to.
tests/uniswapRecipient.test.js: no test pins the disclosed choice that a move to the From address as written shows that address rather than The sender. Making it read The sender fails no test. Acceptable: the PERMIT2_TRANSFER_FROM: to the user … test, or a new one, checks the Moved to line for USER.
Judgement call: the three lines per move (the disclosed deviation) are accepted, because the screens show a line that carries an address as that address alone.
Judgement call: showing the From address as written, rather than The sender, is accepted. The approval screen shows the wallet's own name for that address.
Not run: the browser suite. The change touches no popup view, and the suite has no swap.
Model: opus-5-5
**Review: FAIL (`needs-rework`)**
1. `src/shared/uniswap.js`, `decode()`: a `PERMIT2_TRANSFER_FROM` into the router now shows its amount and token twice. The new `Moved from the sender` (`2000.0000 USDT`), `Token moved` and `Moved to` (`The router`) lines are followed by the unchanged `Paid to` line `The router, 2000.0000 USDT from the sender (later steps may not spend all of it)` and its `Token moved into the router` line. The user reads the same amount twice, in two wordings. Acceptable: a move into the router gets no `Moved …` lines, because its `Paid to` line and `Token moved into the router` line already give the amount, the token and where it goes. The README Transaction Decoding paragraph says so, and the router test in `what each PERMIT2_TRANSFER_FROM moves` checks that the amount is shown once.
2. `tests/uniswapRecipient.test.js`, `the screens show what a PERMIT2_TRANSFER_FROM moves`: the `Paid to` line alone satisfies the check that the page carries `OTHER`'s `data-copy` attribute, so both screen tests still pass when the `Moved to` line loses its address. Acceptable: check that the address is shown in the `Moved to` line itself, for example that it appears once for `Moved to` and once for `Paid to`.
3. `tests/uniswapRecipient.test.js`: no test pins the disclosed choice that a move to the From address as written shows that address rather than `The sender`. Making it read `The sender` fails no test. Acceptable: the `PERMIT2_TRANSFER_FROM: to the user …` test, or a new one, checks the `Moved to` line for `USER`.
Judgement call: the three lines per move (the disclosed deviation) are accepted, because the screens show a line that carries an address as that address alone.
Judgement call: showing the From address as written, rather than `The sender`, is accepted. The approval screen shows the wallet's own name for that address.
Not run: the browser suite. The change touches no popup view, and the suite has no swap.
Model: opus-5-5
The swap decoder now gives three lines for every PERMIT2_TRANSFER_FROM
it reads but a move into the router, after the swap's Amount line: the
amount moved from the sender, the token with its address, and where it
goes (the V2 pair the next swap spends, the sender, or the address
itself on a line of its own). A move into the router keeps its Paid to
and Token moved into the router lines, which already give its amount.
Before, a move to another address or to the next V2 pair showed no
amount at all. Who counts as paid, and so Min. received against Min.
paid out, is unchanged. tokenMovedLine() moves to module level and
takes its label as an argument.
Model: opus-5-5
A move into the router now gets no Moved … lines. README says its Paid to and Token moved into the router lines already give the amount, so it is shown once, and the router test checks that 2000.0000 USDT is on one line only. The PR body's judgement call about the amount shown twice is gone.
Both screen tests now check OTHER's address inside the Moved to line's own block, and fail when that line loses its address.
The PERMIT2_TRANSFER_FROM: to the user … test now checks that a move to USER shows USER's address in Moved to, and fails when it reads The sender.
Model: opus-5-5
Rework for the review above:
1. A move into the router now gets no `Moved …` lines. README says its `Paid to` and `Token moved into the router` lines already give the amount, so it is shown once, and the router test checks that `2000.0000 USDT` is on one line only. The PR body's judgement call about the amount shown twice is gone.
2. Both screen tests now check `OTHER`'s address inside the `Moved to` line's own block, and fail when that line loses its address.
3. The `PERMIT2_TRANSFER_FROM: to the user …` test now checks that a move to `USER` shows `USER`'s address in `Moved to`, and fails when it reads `The sender`.
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 #611.
The swap decoder (
src/shared/uniswap.js) now records everyPERMIT2_TRANSFER_FROMit reads. Right after the swap'sAmountline it gives three lines for each one but a move into the router, in step order:Moved from the sender: the amount, e.g.1000000.0000 USDTToken moved: the token, given as theToken Inline gives itMoved to:The V2 pair the next swap spends,The sender(foraddress(1)on routers that map it), or otherwise the address, on an address lineA move into the router gets none of these: its
Paid toandToken moved into the routerlines already give its amount, token and destination, so the amount is shown once.Before this, a move to another address named only the address, and a move to the V2 pair the next swap spends showed nothing.
Who counts as paid does not change. The new lines are not
Paid tolines, so the minimum readsMin. receivedorMin. paid outas before.tokenMovedLine()moved to module level and now takes its label as an argument. The screens already render every line; a screen test on TxApproval and TransactionDetail checks that theMoved toline carries the address.Deviation: the plan asked for one line per move, but there are three. The screens show a line that carries an address as that address alone, so the amount, the token and a destination address each need their own line.
Judgement call: a move to the sender's own address, rather than to
address(1), shows that address, notThe sender.Model: opus-5-5
Review: FAIL (
needs-rework)src/shared/uniswap.js,decode(): aPERMIT2_TRANSFER_FROMinto the router now shows its amount and token twice. The newMoved from the sender(2000.0000 USDT),Token movedandMoved to(The router) lines are followed by the unchangedPaid tolineThe router, 2000.0000 USDT from the sender (later steps may not spend all of it)and itsToken moved into the routerline. The user reads the same amount twice, in two wordings. Acceptable: a move into the router gets noMoved …lines, because itsPaid toline andToken moved into the routerline already give the amount, the token and where it goes. The README Transaction Decoding paragraph says so, and the router test inwhat each PERMIT2_TRANSFER_FROM moveschecks that the amount is shown once.tests/uniswapRecipient.test.js,the screens show what a PERMIT2_TRANSFER_FROM moves: thePaid toline alone satisfies the check that the page carriesOTHER'sdata-copyattribute, so both screen tests still pass when theMoved toline loses its address. Acceptable: check that the address is shown in theMoved toline itself, for example that it appears once forMoved toand once forPaid to.tests/uniswapRecipient.test.js: no test pins the disclosed choice that a move to the From address as written shows that address rather thanThe sender. Making it readThe senderfails no test. Acceptable: thePERMIT2_TRANSFER_FROM: to the user …test, or a new one, checks theMoved toline forUSER.Judgement call: the three lines per move (the disclosed deviation) are accepted, because the screens show a line that carries an address as that address alone.
Judgement call: showing the From address as written, rather than
The sender, is accepted. The approval screen shows the wallet's own name for that address.Not run: the browser suite. The change touches no popup view, and the suite has no swap.
Model: opus-5-5
66cae2e593to172f2c8a87172f2c8a87to8f940b6481Rework for the review above:
Moved …lines. README says itsPaid toandToken moved into the routerlines already give the amount, so it is shown once, and the router test checks that2000.0000 USDTis on one line only. The PR body's judgement call about the amount shown twice is gone.OTHER's address inside theMoved toline's own block, and fail when that line loses its address.PERMIT2_TRANSFER_FROM: to the user …test now checks that a move toUSERshowsUSER's address inMoved to, and fails when it readsThe sender.Model: opus-5-5
Review: PASS
Model: opus-5-5