fix: decode Uniswap V2 exact-out swaps, input amount shown as a maximum (closes #283)
check / check (push) Failing after 1s
e2e / e2e-chrome (push) Failing after 1s
e2e / e2e-firefox (push) Failing after 1s

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, through setInputOnce() and setOutput()
like 0x08. amountInMax is the most the swap may spend, so the Amount line
reads "Up to <amount>", including the value the wait and error screens
show. The eslint-disable comment on decodeV2SwapExactOut() is gone.

Model: opus-5-5
This commit is contained in:
2026-10-04 08:29:40 +00:00
parent 5bf8b5ff1f
commit 96bc83ff51
4 changed files with 87 additions and 13 deletions
+10
View File
@@ -45,6 +45,16 @@ 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`. Because
`amountInMax` is a ceiling, the `Amount` line reads `Up to <amount>`, there
and on the wait, success and error screens. V3 exact-out (`0x01`) is still not
decoded.
- 2026-10-04: The flash line keeps to the one line it reserves at any message
length ([#252](https://git.eeqj.de/sneak/AutistMask/issues/252)). A message
that wrapped pushed the whole screen below it down. `#flash-msg` no longer