| 344 | } |
| 345 | |
| 346 | WalletModel::EncryptionStatus WalletModel::getEncryptionStatus() const |
| 347 | { |
| 348 | if(!m_wallet->isCrypted()) |
| 349 | { |
| 350 | // A previous bug allowed for watchonly wallets to be encrypted (encryption keys set, but nothing is actually encrypted). |
| 351 | // To avoid misrepresenting the encryption status of such wallets, we only return NoKeys for watchonly wallets that are unencrypted. |
| 352 | if (m_wallet->privateKeysDisabled()) { |
| 353 | return NoKeys; |
| 354 | } |
| 355 | return Unencrypted; |
| 356 | } |
| 357 | else if(m_wallet->isLocked()) |
| 358 | { |
| 359 | return Locked; |
| 360 | } |
| 361 | else |
| 362 | { |
| 363 | return Unlocked; |
| 364 | } |
| 365 | } |
| 366 | |
| 367 | bool WalletModel::setWalletEncrypted(const SecureString& passphrase) |
| 368 | { |
no test coverage detected