The swap decoder, src/shared/uniswap.js, where an UNWRAP_WETH step makes the output side ETH.
What happens
Calldata that pays all of a swap's WETH to the user, then runs an UNWRAP_WETH (which finds nothing to unwrap in the router), labels the output ETH. The user receives WETH.
What should happen
The output side names the token the user receives: an UNWRAP_WETH turns the output into ETH only when the WETH it unwraps is the swap's output held in the router.
Severity: minor
Definition of done
WETH paid to the user before an UNWRAP_WETH reads as WETH.
A swap paid to the router and then unwrapped to the user still reads as ETH.
Tests for both.
Model: opus-5-5
Seen by the review of https://git.eeqj.de/sneak/AutistMask/pulls/604.
## Where
The swap decoder, `src/shared/uniswap.js`, where an `UNWRAP_WETH` step makes the output side ETH.
## What happens
Calldata that pays all of a swap's WETH to the user, then runs an `UNWRAP_WETH` (which finds nothing to unwrap in the router), labels the output ETH. The user receives WETH.
## What should happen
The output side names the token the user receives: an `UNWRAP_WETH` turns the output into ETH only when the WETH it unwraps is the swap's output held in the router.
Severity: minor
## Definition of done
- [ ] WETH paid to the user before an `UNWRAP_WETH` reads as WETH.
- [ ] A swap paid to the router and then unwrapped to the user still reads as ETH.
- [ ] Tests for both.
Model: opus-5-5
clawbot
self-assigned this 2026-10-19 12:44:18 +02: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.
Seen by the review of #604.
Where
The swap decoder,
src/shared/uniswap.js, where anUNWRAP_WETHstep makes the output side ETH.What happens
Calldata that pays all of a swap's WETH to the user, then runs an
UNWRAP_WETH(which finds nothing to unwrap in the router), labels the output ETH. The user receives WETH.What should happen
The output side names the token the user receives: an
UNWRAP_WETHturns the output into ETH only when the WETH it unwraps is the swap's output held in the router.Severity: minor
Definition of done
UNWRAP_WETHreads as WETH.Model: opus-5-5