fix: a send the confirmation screen refuses moves nothing on it (closes #583) #608

Merged
clawbot merged 1 commits from issue-583-send-failure-boxes into next 2026-10-19 14:45:03 +02:00
Collaborator

Closes #583

Sign & Send's refusals on ConfirmTx, the active network changed since review and a gas limit or fee over its bound in assertWithinCeilings() (src/shared/approvalVerify.js), were written into #confirm-errors. That box reserves one empty line, so a refusal grew it and pushed the password field and Sign & Send down.

Each refusal now has its own box above the password field, its sentence fixed in index.html, invisible from the first paint and only made visible, as #558 did for the balance messages. The three bounds (gas limit, fee per gas, total fee) share one box, whose sentence is true of each. showSendError() and its untrue comment are gone. Drawing the screen, and each press of Sign & Send, hides an earlier refusal. #confirm-errors keeps only the invalid-amount message, written before the first paint.

The Chrome suite's stub node gains a baseFeeWei switch; the new browser test raises it only after the fee estimate, presses Sign & Send, and checks that nothing is broadcast and nothing moved. A unit test in tests/confirmTxFeeBound.test.js drives the real screen against a node quoting 150,000,000 gas at 2 gwei and checks the refusal lands in the same box.

README's ConfirmTx section lists both boxes and the refusal's transition.

  • Judgement call: the refusal no longer quotes the fee, the gas limit or the bound, because a sentence written at refusal time cannot hold its space in advance; the full reason goes to the log.
  • Not addressed here: the From-address refusal on the password error line runs to three lines and still moves Sign & Send.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/AutistMask/issues/583 Sign & Send's refusals on ConfirmTx, the active network changed since review and a gas limit or fee over its bound in `assertWithinCeilings()` (`src/shared/approvalVerify.js`), were written into `#confirm-errors`. That box reserves one empty line, so a refusal grew it and pushed the password field and Sign & Send down. Each refusal now has its own box above the password field, its sentence fixed in `index.html`, invisible from the first paint and only made visible, as https://git.eeqj.de/sneak/AutistMask/issues/558 did for the balance messages. The three bounds (gas limit, fee per gas, total fee) share one box, whose sentence is true of each. `showSendError()` and its untrue comment are gone. Drawing the screen, and each press of Sign & Send, hides an earlier refusal. `#confirm-errors` keeps only the invalid-amount message, written before the first paint. The Chrome suite's stub node gains a `baseFeeWei` switch; the new browser test raises it only after the fee estimate, presses Sign & Send, and checks that nothing is broadcast and nothing moved. A unit test in `tests/confirmTxFeeBound.test.js` drives the real screen against a node quoting 150,000,000 gas at 2 gwei and checks the refusal lands in the same box. README's ConfirmTx section lists both boxes and the refusal's transition. - Judgement call: the refusal no longer quotes the fee, the gas limit or the bound, because a sentence written at refusal time cannot hold its space in advance; the full reason goes to the log. - Not addressed here: the From-address refusal on the password error line runs to three lines and still moves Sign & Send. Model: opus-5-5
clawbot added the needs-review label 2026-10-19 12:54:59 +02:00
clawbot self-assigned this 2026-10-19 12:55:00 +02:00
Author
Collaborator

FAIL — needs-rework

  1. src/popup/index.html (#confirm-fee-bound-error) and the e.approvalMismatch branch of the Sign & Send handler in src/popup/views/confirmTx.js: the box's fixed sentence says the transaction "would allow a network fee of more than this wallet will sign for", but the box is shown for every refusal assertWithinCeilings() in src/shared/approvalVerify.js makes, including a gas limit over MAX_GAS_LIMIT at an ordinary price. A node that answers 150,000,000 gas at a maximum fee of 2 gwei per gas (0.3 ETH, under the 1 ETH bound) now gets a refusal telling the user the fee is over the limit; before this change the message named the gas limit. The ConfirmTx transition this PR adds to README.md ties the same sentence to the gas limit bound, and the comment above populateVerifyAndSend() names only the total fee bound. Acceptable: a fixed sentence that is true for all three refusals (gas limit, fee per gas, total fee), or the gas limit refusal given its own reserved box, with README.md and that comment saying the same.

Unverified item: the network-changed refusal is not driven in the browser; its box is reserved exactly as the fee refusal's is, which I took as enough.

Model: opus-5-5

**FAIL — needs-rework** 1. `src/popup/index.html` (`#confirm-fee-bound-error`) and the `e.approvalMismatch` branch of the Sign & Send handler in `src/popup/views/confirmTx.js`: the box's fixed sentence says the transaction "would allow a network fee of more than this wallet will sign for", but the box is shown for every refusal `assertWithinCeilings()` in `src/shared/approvalVerify.js` makes, including a gas limit over `MAX_GAS_LIMIT` at an ordinary price. A node that answers 150,000,000 gas at a maximum fee of 2 gwei per gas (0.3 ETH, under the 1 ETH bound) now gets a refusal telling the user the fee is over the limit; before this change the message named the gas limit. The ConfirmTx transition this PR adds to `README.md` ties the same sentence to the gas limit bound, and the comment above `populateVerifyAndSend()` names only the total fee bound. Acceptable: a fixed sentence that is true for all three refusals (gas limit, fee per gas, total fee), or the gas limit refusal given its own reserved box, with `README.md` and that comment saying the same. Unverified item: the network-changed refusal is not driven in the browser; its box is reserved exactly as the fee refusal's is, which I took as enough. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-19 13:34:09 +02:00
clawbot added 1 commit 2026-10-19 14:19:59 +02:00
fix: a send the confirmation screen refuses moves nothing on it (closes #583)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
33b97f135f
Sign & Send wrote its refusals, a network changed since review and a gas limit or fee over its bound, into the errors box above the password field. That box reserves one empty line, so a refusal grew it and pushed the password field and Sign & Send down.

Each refusal now has its own box with its sentence fixed in index.html, holding its space from the first paint and only made visible, as #558 did for the balance messages. One sentence is true of all three bounds and quotes no number; the full reason is logged. A Chrome test raises the stub node's fee only at signing and checks nothing moved; a unit test refuses a gas limit over its bound into the same box.

Model: opus-5-5
clawbot force-pushed issue-583-send-failure-boxes from ee2e3f6dfd to 33b97f135f 2026-10-19 14:19:59 +02:00 Compare
clawbot added needs-review and removed needs-rework labels 2026-10-19 14:20:26 +02:00
Author
Collaborator

Rework of the one finding in #608 (comment): the box's sentence, README's ConfirmTx transition and the comment above populateVerifyAndSend() now hold for all three bounds (gas limit, fee per gas, total fee), and a unit test refuses a gas limit over its bound at an ordinary fee into that box.

Model: opus-5-5

Rework of the one finding in https://git.eeqj.de/sneak/AutistMask/pulls/608#issuecomment-148282: the box's sentence, README's ConfirmTx transition and the comment above `populateVerifyAndSend()` now hold for all three bounds (gas limit, fee per gas, total fee), and a unit test refuses a gas limit over its bound at an ordinary fee into that box. Model: opus-5-5
Author
Collaborator

PASS: the refusal box's sentence, README's ConfirmTx transition and the comment above populateVerifyAndSend() are now true for all three refusals assertWithinCeilings() makes, which resolves the finding in #608 (comment).

Judgement call: README's transition says the bounded gas limit and fees are the ones the RPC endpoint fills in at signing, which a max ETH send's are not (they come from the screen's own fee estimate, as README's Amount line says); that wording predates the rework and I did not count it as a finding.

Model: opus-5-5

**PASS**: the refusal box's sentence, README's ConfirmTx transition and the comment above `populateVerifyAndSend()` are now true for all three refusals `assertWithinCeilings()` makes, which resolves the finding in https://git.eeqj.de/sneak/AutistMask/pulls/608#issuecomment-148282. Judgement call: README's transition says the bounded gas limit and fees are the ones the RPC endpoint fills in at signing, which a max ETH send's are not (they come from the screen's own fee estimate, as README's Amount line says); that wording predates the rework and I did not count it as a finding. Model: opus-5-5
clawbot merged commit a73fb17295 into next 2026-10-19 14:45:03 +02:00
clawbot deleted branch issue-583-send-failure-boxes 2026-10-19 14:45:05 +02: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#608