test: cover every control that refuses a defective wallet (closes #254) #464

Merged
clawbot merged 1 commits from issue-254-defective-wallet-gates into next 2026-10-05 12:59:15 +02:00
Collaborator

Closes #254.

Each control that leads to a signature or to the private key now has a unit test in tests/walletDefects.test.js that it refuses a defective wallet before decrypting anything: Send on the main, address and token screens, Export Private Key, and both approval screens, each checked as drawn (error shown, Approve disabled) and as clicked (no decrypt, nothing sent to the background).

Confirmation screen. Its Send is now gated the same way, with a test. The Send buttons stand in front of it, but confirm-tx is a view the popup reopens onto from saved state, so they are not the only way onto it.

Comments. The walletDefects.js module comment names both earlier import paths and says which one the depth check misjudges (7a7f9c5, in no tag). The export comment in addressDetail.js no longer says there is no key: it derives, and getSignerForAddress refuses it.

Worth knowing:

  • Each gate was deleted one at a time (the approval screens' gate at both call sites and both click guards separately, plus the new one), and every deletion failed its test.
  • The click-guard tests run a listener the screen has disabled, which a browser would not: they ask whether the handler refuses on its own.
  • The confirmation test makes the decrypt fail, because drawing that screen starts a network fee estimate.

Disclosures:

  • Judgement call: the same "cannot be derived" claim in two neighbouring comments (selectedWalletDefect in addressDetail.js, gateOnWalletDefect in approval.js) is corrected too.
  • No user-facing wording changed; #255 is open.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/AutistMask/issues/254. Each control that leads to a signature or to the private key now has a unit test in `tests/walletDefects.test.js` that it refuses a defective wallet before decrypting anything: Send on the main, address and token screens, Export Private Key, and both approval screens, each checked as drawn (error shown, Approve disabled) and as clicked (no decrypt, nothing sent to the background). **Confirmation screen.** Its Send is now gated the same way, with a test. The Send buttons stand in front of it, but `confirm-tx` is a view the popup reopens onto from saved state, so they are not the only way onto it. **Comments.** The `walletDefects.js` module comment names both earlier import paths and says which one the depth check misjudges (`7a7f9c5`, in no tag). The export comment in `addressDetail.js` no longer says there is no key: it derives, and `getSignerForAddress` refuses it. Worth knowing: - Each gate was deleted one at a time (the approval screens' gate at both call sites and both click guards separately, plus the new one), and every deletion failed its test. - The click-guard tests run a listener the screen has disabled, which a browser would not: they ask whether the handler refuses on its own. - The confirmation test makes the decrypt fail, because drawing that screen starts a network fee estimate. Disclosures: - Judgement call: the same "cannot be derived" claim in two neighbouring comments (`selectedWalletDefect` in `addressDetail.js`, `gateOnWalletDefect` in `approval.js`) is corrected too. - No user-facing wording changed; https://git.eeqj.de/sneak/AutistMask/issues/255 is open. Model: opus-5-5
clawbot added the needs-review label 2026-10-05 11:59:38 +02:00
clawbot self-assigned this 2026-10-05 11:59:38 +02:00
Author
Collaborator

PASS

Model: opus-5-5

PASS Model: opus-5-5
clawbot added 1 commit 2026-10-05 12:28:46 +02:00
test: cover every control that refuses a defective wallet (closes #254)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
d9a516e489
Each control that leads to a signature or to the private key now has a
test that it refuses a defective wallet before decrypting anything: Send
on the main, address and token screens, Export Private Key, and both
approval screens, as drawn and as clicked.

Send on the confirmation screen had no such check. The Send buttons
stand in front of it, but the popup reopens onto it from a saved view,
so it now refuses the same way.

The comments that said the wallet's key cannot be derived now say that
getSignerForAddress refuses it, and the walletDefects module comment
names both earlier import paths.

Model: opus-5-5
clawbot force-pushed issue-254-defective-wallet-gates from f2b17fbec6 to d9a516e489 2026-10-05 12:28:46 +02:00 Compare
Author
Collaborator

Rebased onto next at d0bbb3d: only TODO.md conflicted, resolved by keeping both Completed Steps entries, the one for #254 above the one for #253; nothing else changed.

Model: opus-5-5

Rebased onto `next` at `d0bbb3d`: only `TODO.md` conflicted, resolved by keeping both Completed Steps entries, the one for https://git.eeqj.de/sneak/AutistMask/issues/254 above the one for https://git.eeqj.de/sneak/AutistMask/issues/253; nothing else changed. Model: opus-5-5
Author
Collaborator

PASS

Model: opus-5-5

PASS Model: opus-5-5
clawbot merged commit 5d26283cd0 into next 2026-10-05 12:59:15 +02:00
clawbot deleted branch issue-254-defective-wallet-gates 2026-10-05 12:59:16 +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#464