fix: decode Uniswap V2 exact-out swaps, input amount shown as a maximum (closes #283)
check / check (push) Successful in 2m32s
e2e / e2e-chrome (push) Successful in 3m28s
e2e / e2e-firefox (push) Successful in 31s

decode() had no arm for Universal Router command 0x09, so the approval
screen named the step and showed no token or amount. It now takes the
path's first token with amountInMax as the input side and the last token
with amountOut as the output side, like 0x08. When the transaction has
such a step, the Amount figure reads "Up to <amount>" whichever step set
it, a WRAP_ETH or a permit included, and so does the value the wait,
success and error screens show. In such a swap paid in ETH, the
UNWRAP_WETH step that returns the ETH not spent does not make the output
ETH. The eslint-disable comment on decodeV2SwapExactOut() is gone.

Model: opus-5-5
This commit is contained in:
2026-10-04 09:10:00 +00:00
parent 467b849a13
commit a93eba3f46
4 changed files with 147 additions and 13 deletions
+11
View File
@@ -45,6 +45,17 @@ but the review is broader than any of them.
# Completed Steps
- 2026-10-04: A Uniswap V2 exact-out swap (Universal Router command `0x09`) is
decoded on the approval screen
([#283](https://git.eeqj.de/sneak/AutistMask/issues/283)). `decode()` in
`src/shared/uniswap.js` had no arm for it, so the screen named the step and
showed no token or amount. The input side is the path's first token with
`amountInMax`, the output side the last token with `amountOut`. When the
transaction has such a step, the `Amount` figure reads `Up to <amount>`,
whichever step set it, there and on the wait, success and error screens. In
such a swap paid in ETH, the `UNWRAP_WETH` step that returns the ETH not spent
does not make `Token Out` ETH. V3 exact-out (`0x01`) is still not decoded.
- 2026-10-04: The Send and confirmation screens no longer show an ETH balance, a
token balance or a network fee below 0.000001 as zero
([#343](https://git.eeqj.de/sneak/AutistMask/issues/343)). The stored balances