test: cover every control that refuses a defective wallet (closes #254)
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
This commit was merged in pull request #464.
This commit is contained in:
@@ -822,9 +822,10 @@ function setSignButtonBusy(busy) {
|
||||
}
|
||||
|
||||
// Say so on the approval screen itself, and disable the approve button, when
|
||||
// the address the approval was raised for belongs to a wallet whose keys
|
||||
// cannot be derived. Without this the screen would take a password and fail
|
||||
// after deriving it. Reject stays available; the wallet is not touched.
|
||||
// the address the approval was raised for belongs to a wallet whose key
|
||||
// getSignerForAddress refuses. Without this the screen would take a password
|
||||
// and fail after deriving it. Reject stays available; the wallet is not
|
||||
// touched.
|
||||
// Returns true when it gated.
|
||||
function gateOnWalletDefect(errorId, buttonId, address) {
|
||||
const owner = findWalletFor(address);
|
||||
|
||||
Reference in New Issue
Block a user