The swap decoder, decode() in src/shared/uniswap.js, the WRAP_ETH branch and the Moved from the sender lines.
What happens
Found by the review of #679; the same on next before that PR. A WRAP_ETH that does not set the input side gets no Moved from the sender line. A V3 exact-in of 600 USDT, then a WRAP_ETH of 1 ETH to another address, gives no ETH figure among the decoded lines, though 1 ETH leaves the wallet. Read from the code; not run on a chain.
What should happen
Every amount the calldata takes from the sender has a line. A later WRAP_ETH that wraps a stated amount and pays anyone but the router reads Moved from the sender, with that amount and the recipient on Moved to.
Severity: minor
Definition of done
The route above shows a Moved from the sender line of 1 ETH naming the recipient.
A Jest test, failing on next.
Uniswap's own routes read as on next.
Model: opus-5-5
## Where
The swap decoder, `decode()` in `src/shared/uniswap.js`, the `WRAP_ETH` branch and the `Moved from the sender` lines.
## What happens
Found by the review of https://git.eeqj.de/sneak/AutistMask/pulls/679; the same on `next` before that PR. A `WRAP_ETH` that does not set the input side gets no `Moved from the sender` line. A V3 exact-in of 600 USDT, then a `WRAP_ETH` of 1 ETH to another address, gives no ETH figure among the decoded lines, though 1 ETH leaves the wallet. Read from the code; not run on a chain.
## What should happen
Every amount the calldata takes from the sender has a line. A later `WRAP_ETH` that wraps a stated amount and pays anyone but the router reads `Moved from the sender`, with that amount and the recipient on `Moved to`.
Severity: minor
## Definition of done
- [ ] The route above shows a `Moved from the sender` line of 1 ETH naming the recipient.
- [ ] A Jest test, failing on `next`.
- [ ] Uniswap's own routes read as on `next`.
Model: opus-5-5
clawbot
self-assigned this 2026-11-03 03:02:19 +01:00
Plan: one PR to next, in the WRAP_ETH branch of decode() in src/shared/uniswap.js. A WRAP_ETH of a stated amount that does not set the input side takes that ETH from the transaction's value, so it joins userPaid with its recipient. Moved to names that recipient, reads The sender for address(1), and reads The swap step that spends it for the router. When the router may hold ETH (routerHeldEth), the amount reads Up to, as a V4 step's ETH does. A CONTRACT_BALANCE wrap takes nothing from the sender and stays as it is. Rows in tests/uniswap.test.js, failing on next; Uniswap's own routes read as on next. README's sentence on these lines says so.
Model: opus-5-5
Plan: one PR to `next`, in the `WRAP_ETH` branch of `decode()` in `src/shared/uniswap.js`. A `WRAP_ETH` of a stated amount that does not set the input side takes that ETH from the transaction's value, so it joins `userPaid` with its recipient. `Moved to` names that recipient, reads `The sender` for `address(1)`, and reads `The swap step that spends it` for the router. When the router may hold ETH (`routerHeldEth`), the amount reads `Up to`, as a V4 step's ETH does. A `CONTRACT_BALANCE` wrap takes nothing from the sender and stays as it is. Rows in `tests/uniswap.test.js`, failing on `next`; Uniswap's own routes read as on `next`. README's sentence on these lines says so.
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.
Where
The swap decoder,
decode()insrc/shared/uniswap.js, theWRAP_ETHbranch and theMoved from the senderlines.What happens
Found by the review of #679; the same on
nextbefore that PR. AWRAP_ETHthat does not set the input side gets noMoved from the senderline. A V3 exact-in of 600 USDT, then aWRAP_ETHof 1 ETH to another address, gives no ETH figure among the decoded lines, though 1 ETH leaves the wallet. Read from the code; not run on a chain.What should happen
Every amount the calldata takes from the sender has a line. A later
WRAP_ETHthat wraps a stated amount and pays anyone but the router readsMoved from the sender, with that amount and the recipient onMoved to.Severity: minor
Definition of done
Moved from the senderline of 1 ETH naming the recipient.next.next.Model: opus-5-5
Plan: one PR to
next, in theWRAP_ETHbranch ofdecode()insrc/shared/uniswap.js. AWRAP_ETHof a stated amount that does not set the input side takes that ETH from the transaction's value, so it joinsuserPaidwith its recipient.Moved tonames that recipient, readsThe senderforaddress(1), and readsThe swap step that spends itfor the router. When the router may hold ETH (routerHeldEth), the amount readsUp to, as a V4 step's ETH does. ACONTRACT_BALANCEwrap takes nothing from the sender and stays as it is. Rows intests/uniswap.test.js, failing onnext; Uniswap's own routes read as onnext. README's sentence on these lines says so.Model: opus-5-5