docs: README still says a genuine zero renders 0.0000, and the approval screen's refusal vocabulary is undocumented #369

Open
opened 2026-08-23 20:46:17 +02:00 by clawbot · 1 comment
Collaborator

Found by the review of #368 (#368 (comment)).

The approval screen has accumulated a vocabulary of refusals and sentinels across several units, and README.md documents none of it — while still carrying a sentence that is now false.

  • README.md around line 874 says "A genuine zero still renders 0.0000", a few lines below a passage that uses Min. received as its worked example. After #359 a zero minimum renders None (no minimum guaranteed), so the example and the claim now contradict each other.
  • The two wordings added by that unit — All available (V4 open delta) and None (no minimum guaranteed) — are undocumented, as is their relationship to the pre-existing Unlimited, Unknown (not named in the calldata) (#353, #357) and … base units (decimals unknown) (#340).
  • The NO_MINIMUM wording also reaches BALANCE_CHECK_ERC20, where minBalance = 0n previously rendered 0.0000 USDC and now renders None (no minimum guaranteed). That path was absent from the sweep table in #368 and is undocumented.

This is documentation precision on the screen that states what a user is authorizing — the same reason #331 was in the milestone.

Definition of done

  • The false "genuine zero renders 0.0000" sentence is corrected, and its worked example no longer contradicts it.
  • The amount-display section names every string the approval screen can show in an amount slot, and what each means: a formatted quantity, Unlimited, All available (V4 open delta), None (no minimum guaranteed), … base units (decimals unknown), Unknown (not named in the calldata).
  • The BALANCE_CHECK_ERC20 behaviour change is stated.
  • Each claim is checked against the code before it is written — a false claim in this area has been shipped and caught repeatedly in this milestone.
  • make check green.
Found by the review of https://git.eeqj.de/sneak/AutistMask/pulls/368 (https://git.eeqj.de/sneak/AutistMask/pulls/368#issuecomment-69335). The approval screen has accumulated a vocabulary of refusals and sentinels across several units, and `README.md` documents none of it — while still carrying a sentence that is now false. - `README.md` around line 874 says "A genuine zero still renders `0.0000`", a few lines below a passage that uses `Min. received` as its worked example. After https://git.eeqj.de/sneak/AutistMask/issues/359 a zero minimum renders `None (no minimum guaranteed)`, so the example and the claim now contradict each other. - The two wordings added by that unit — `All available (V4 open delta)` and `None (no minimum guaranteed)` — are undocumented, as is their relationship to the pre-existing `Unlimited`, `Unknown (not named in the calldata)` (https://git.eeqj.de/sneak/AutistMask/issues/353, https://git.eeqj.de/sneak/AutistMask/issues/357) and `… base units (decimals unknown)` (https://git.eeqj.de/sneak/AutistMask/issues/340). - The `NO_MINIMUM` wording also reaches `BALANCE_CHECK_ERC20`, where `minBalance = 0n` previously rendered `0.0000 USDC` and now renders `None (no minimum guaranteed)`. That path was absent from the sweep table in https://git.eeqj.de/sneak/AutistMask/pulls/368 and is undocumented. This is documentation precision on the screen that states what a user is authorizing — the same reason https://git.eeqj.de/sneak/AutistMask/issues/331 was in the milestone. ## Definition of done - [ ] The false "genuine zero renders `0.0000`" sentence is corrected, and its worked example no longer contradicts it. - [ ] The amount-display section names every string the approval screen can show in an amount slot, and what each means: a formatted quantity, `Unlimited`, `All available (V4 open delta)`, `None (no minimum guaranteed)`, `… base units (decimals unknown)`, `Unknown (not named in the calldata)`. - [ ] The `BALANCE_CHECK_ERC20` behaviour change is stated. - [ ] Each claim is checked against the code before it is written — a false claim in this area has been shipped and caught repeatedly in this milestone. - [ ] `make check` green.
clawbot added this to the 1.0.0 milestone 2026-09-21 09:20:01 +02:00
Author
Collaborator

Done in #393 (docs only, base next).

Corrected the stale claim that a genuine zero renders 0.0000: it holds for the ERC-20 approve/transfer amount, but the swap's Amount and Min. received state their two misleading zeros (a V4 open delta and a zero minimum) in words before the floor is reached. Added a list to the amount-display section naming every string an amount slot can show — a formatted quantity, Unlimited, All available (V4 open delta), None (no minimum guaranteed), base units with decimals unknown, and Unknown (not named in the calldata) — and recorded that a zero minBalance on a BALANCE_CHECK_ERC20 step now reads None (no minimum guaranteed) where it once read 0.0000.

Every string and file reference checked against src/shared/uniswap.js, src/shared/amountDisplay.js, src/shared/approvalAmount.js and src/popup/views/approval.js on next.

Model: opus-4-8

Done in https://git.eeqj.de/sneak/AutistMask/pulls/393 (docs only, base `next`). Corrected the stale claim that a genuine zero renders `0.0000`: it holds for the ERC-20 `approve`/`transfer` amount, but the swap's `Amount` and `Min. received` state their two misleading zeros (a V4 open delta and a zero minimum) in words before the floor is reached. Added a list to the amount-display section naming every string an amount slot can show — a formatted quantity, `Unlimited`, `All available (V4 open delta)`, `None (no minimum guaranteed)`, base units with decimals unknown, and `Unknown (not named in the calldata)` — and recorded that a zero `minBalance` on a `BALANCE_CHECK_ERC20` step now reads `None (no minimum guaranteed)` where it once read `0.0000`. Every string and file reference checked against `src/shared/uniswap.js`, `src/shared/amountDisplay.js`, `src/shared/approvalAmount.js` and `src/popup/views/approval.js` on `next`. Model: opus-4-8
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#369