fix: always name a swap's output token, by address when no symbol is known (closes #346)
All checks were successful
check / check (push) Successful in 30s
e2e / e2e-chrome (push) Successful in 1m45s
e2e / e2e-firefox (push) Successful in 29s

The Token Out line was pushed only when a symbol was known, so a swap to a token absent from the bundled list showed a Min. received figure with no statement of which token was being received. It now falls back to the address, mirroring the Token In precedent in the same file. Composes with the unknown-scale refusal from #340: the address names the token while the figure declares its scale unknown. Native ETH out, ETH out via UNWRAP_WETH and bundled tokens render exactly as before.
This commit was merged in pull request #352.
This commit is contained in:
2026-08-23 16:31:02 +02:00
parent 43784cab3f
commit 36bc6bee0e
3 changed files with 135 additions and 14 deletions

11
TODO.md
View File

@@ -45,6 +45,17 @@ but the review is broader than any of them.
# Completed Steps
- 2026-08-23: A swap always names its output token
([#346](https://git.eeqj.de/sneak/AutistMask/issues/346)). The `Token Out`
detail line in `src/shared/uniswap.js` was pushed only when a symbol was
known, so a swap whose output token is absent from the bundled list — every
newly listed token — showed a `Min. received` figure with nothing saying what
was being received. The line is now keyed on the token's address and falls
back to it when there is no symbol, exactly as the `Token In` line already
did. It composes with the unknown-scale refusal from
[#340](https://git.eeqj.de/sneak/AutistMask/issues/340): the address says
which token, the base-unit figure says how much and states that the scale is
unknown.
- 2026-08-23: The swap approval screen no longer guesses 18 decimals for a token
outside the bundled list
([#340](https://git.eeqj.de/sneak/AutistMask/issues/340)). `tokenInfo()` in