test: the defective-wallet UI gates have no coverage — all six can be deleted with the suite still green #254
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Three findings from the independent review of #247, reported as non-blocking and filed rather than dropped. That PR has landed.
1. Six gates, zero regression signal
The reviewer removed all six defective-wallet UI gates and
make teststill reported 15 suites / 383 passed. The e2e suite has no defective-wallet case either. OnlywalletListHtmland thegetSignerForAddressbackstop carry any coverage.The code is correct — the reviewer verified each gate by reading and confirmed via
make test-e2e(13/13) that no touched view throws. But six guards that protect a user from a signing path that would otherwise throw mid-send, with nothing that fails when they are removed, will not survive contact with a future refactor.This is the same class #152 addresses from the other direction:
make checkisprettier --checkplus unit tests and cannot see aReferenceErrorin a view handler, which is how #150 and #151 shipped.2. A fourth
getSignerForAddresscaller is ungatedsrc/popup/views/confirmTx.js:423. Not a live defect — all threeshowView("send")call sites are gated, and its throw is caught intotxStatus.showError— but it is the one path that reaches the signer without a gate in front of it, and it was not in the implementer's enumerated list.3. Two comments state things that are not true
walletDefectsmodule comment says "the pre-#210 path". Commit7a7f9c5stored the xpub with no derivation, so a wallet written by that build would be falsely condemned at depth 0 and missed at depth 4. Unreachable — same-second fix, no tag contains it — but it should read "paths".src/popup/views/addressDetail.jsclaims "There is no private key to export" for a defective wallet. Untrue: the key derives fine. The gate is still right (without it thecatchreports "Wrong password."), but the stated reason is wrong.Definition of done
src/popup/views/confirmTx.js:423is either gated or explicitly ruled out in the PR body with the reason.TODO.mdupdated in the same commit.make checkpasses.