The swap decoder, decode() in src/shared/uniswap.js, the lines of a WRAP_ETH.
What happens
Found by the reviews of #725; the same on next before that PR. Read from the code; not run on a chain.
A WRAP_ETH into the router followed by a SWEEP of that WETH to another address reads Moved to: The swap step that spends it, though no swap step spends it. Paid to names the address.
A WRAP_ETH of CONTRACT_BALANCE to another address pays that address all the ETH the transaction carries, with no Moved from the sender line. The approval screen's Value line gives that ETH.
What should happen
Every line states what the calldata does.
Severity: minor
Definition of done
When no later swap step spends the WETH, that Moved to line reads The router.
A later WRAP_ETH of CONTRACT_BALANCE to anyone but the router gets a Moved from the sender line reading All the ETH the transaction carries, and names the recipient on Moved to.
Rows in tests/uniswap.test.js, 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 lines of a `WRAP_ETH`.
## What happens
Found by the reviews of https://git.eeqj.de/sneak/AutistMask/pulls/725; the same on `next` before that PR. Read from the code; not run on a chain.
- A `WRAP_ETH` into the router followed by a `SWEEP` of that WETH to another address reads `Moved to: The swap step that spends it`, though no swap step spends it. `Paid to` names the address.
- A `WRAP_ETH` of `CONTRACT_BALANCE` to another address pays that address all the ETH the transaction carries, with no `Moved from the sender` line. The approval screen's `Value` line gives that ETH.
## What should happen
Every line states what the calldata does.
Severity: minor
## Definition of done
- [ ] When no later swap step spends the WETH, that `Moved to` line reads `The router`.
- [ ] A later `WRAP_ETH` of `CONTRACT_BALANCE` to anyone but the router gets a `Moved from the sender` line reading `All the ETH the transaction carries`, and names the recipient on `Moved to`.
- [ ] Rows in `tests/uniswap.test.js`, failing on `next`. Uniswap's own routes read as on `next`.
Model: opus-5-5
clawbot
self-assigned this 2026-11-03 14:03:35 +01:00
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, the lines of aWRAP_ETH.What happens
Found by the reviews of #725; the same on
nextbefore that PR. Read from the code; not run on a chain.WRAP_ETHinto the router followed by aSWEEPof that WETH to another address readsMoved to: The swap step that spends it, though no swap step spends it.Paid tonames the address.WRAP_ETHofCONTRACT_BALANCEto another address pays that address all the ETH the transaction carries, with noMoved from the senderline. The approval screen'sValueline gives that ETH.What should happen
Every line states what the calldata does.
Severity: minor
Definition of done
Moved toline readsThe router.WRAP_ETHofCONTRACT_BALANCEto anyone but the router gets aMoved from the senderline readingAll the ETH the transaction carries, and names the recipient onMoved to.tests/uniswap.test.js, failing onnext. Uniswap's own routes read as onnext.Model: opus-5-5