fix: the wait and error screens show a swap's Permit2 allowance amounts (closes #733) #737

Merged
clawbot merged 1 commits from issue-733-permit2-on-wait-error-screens into next 2026-11-03 09:14:24 +01:00
Collaborator

A swap can give another spender an allowance that its Amount figure leaves out. The approval screen shows it, but the wait and error screens did not. On the route in #733 they read only 1.0000 ETH.

Both screens now show each Permit2 allowance amount under the figure, after the Moved from the sender amounts that #732 added. The decoder is unchanged.

An amount of about 47 digits or more no longer loses its last digits at the screen's edge. The Amount figure and the amounts under it now wrap.

Disclosures:

  • Judgement call: as the plan says, only the amount shows. An Unlimited allowance therefore names no token or spender on these two screens. The approval and success screens name both.
  • Judgement call: movedFromSenderHtml() is now movedOrAllowedHtml(), because the old name no longer says what it shows.
  • Deviation: the test of the real route is in tests/swapStatusAmount.test.js, which has the approval screen set-up it needs. The plan names only tests/txStatus.test.js, which holds the other new tests.
  • Not verified: the layout, the wrapping included, has not been looked at in a browser. The tests read the screens' HTML.

Model: opus-5-5

A swap can give another spender an allowance that its `Amount` figure leaves out. The approval screen shows it, but the wait and error screens did not. On the route in https://git.eeqj.de/sneak/AutistMask/issues/733 they read only `1.0000 ETH`. Both screens now show each `Permit2 allowance` amount under the figure, after the `Moved from the sender` amounts that https://git.eeqj.de/sneak/AutistMask/pulls/732 added. The decoder is unchanged. An amount of about 47 digits or more no longer loses its last digits at the screen's edge. The `Amount` figure and the amounts under it now wrap. Disclosures: - Judgement call: as the plan says, only the amount shows. An `Unlimited` allowance therefore names no token or spender on these two screens. The approval and success screens name both. - Judgement call: `movedFromSenderHtml()` is now `movedOrAllowedHtml()`, because the old name no longer says what it shows. - Deviation: the test of the real route is in `tests/swapStatusAmount.test.js`, which has the approval screen set-up it needs. The plan names only `tests/txStatus.test.js`, which holds the other new tests. - Not verified: the layout, the wrapping included, has not been looked at in a browser. The tests read the screens' HTML. Model: opus-5-5
clawbot added the needs-review label 2026-11-03 08:29:03 +01:00
clawbot self-assigned this 2026-11-03 08:29:04 +01:00
clawbot added 1 commit 2026-11-03 08:29:04 +01:00
fix: the wait and error screens show a swap's Permit2 allowance amounts (closes #733)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
5819f48376
A swap can give another spender an allowance that its Amount figure leaves
out, and these two screens did not show it. Both now show each Permit2
allowance amount under the figure, with the Moved from the sender amounts.
movedFromSenderHtml() is now movedOrAllowedHtml(), as it shows both.

An amount too long for one line now wraps on these screens, rather than losing
its last digits at the screen's edge.

Model: opus-5-5
Author
Collaborator

This change fixes #733 as its plan and definition of done ask, and it is ready to merge into next.

  • Follow-up: break-all also splits words in a long text line, so 1000000000000000000 base units (decimals unknown) breaks into (decimals un and known). Using break-words instead, on wait-tx-summary and error-tx-summary in src/popup/index.html and on the amount in movedOrAllowedHtml() in src/popup/views/txStatus.js, keeps words whole and still wraps long runs of digits.
  • Follow-up: a Permit2 allowance line that reads Unlimited does not say which token it covers on these two screens. Showing the Allowance token line with it would say so.
  • Judgement call: the plan and the definition of done ask for the allowance line and not its token, so the missing token did not fail this review.
  • Not verified: the wrapping in Firefox.

Model: opus-5-5

This change fixes https://git.eeqj.de/sneak/AutistMask/issues/733 as its plan and definition of done ask, and it is ready to merge into `next`. - Follow-up: `break-all` also splits words in a long text line, so `1000000000000000000 base units (decimals unknown)` breaks into `(decimals un` and `known)`. Using `break-words` instead, on `wait-tx-summary` and `error-tx-summary` in `src/popup/index.html` and on the amount in `movedOrAllowedHtml()` in `src/popup/views/txStatus.js`, keeps words whole and still wraps long runs of digits. - Follow-up: a `Permit2 allowance` line that reads `Unlimited` does not say which token it covers on these two screens. Showing the `Allowance token` line with it would say so. - Judgement call: the plan and the definition of done ask for the allowance line and not its token, so the missing token did not fail this review. - Not verified: the wrapping in Firefox. Model: opus-5-5
clawbot merged commit 1ea0730a81 into next 2026-11-03 09:14:24 +01:00
clawbot deleted branch issue-733-permit2-on-wait-error-screens 2026-11-03 09:14:25 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#737