MCPcopy Create free account
hub / github.com/ElementsProject/elements / getEncryptionStatus

Method getEncryptionStatus

src/qt/walletmodel.cpp:346–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344}
345
346WalletModel::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
367bool WalletModel::setWalletEncrypted(const SecureString& passphrase)
368{

Callers 2

unlockWalletMethod · 0.80
updateWalletStatusMethod · 0.80

Calls 3

isCryptedMethod · 0.80
privateKeysDisabledMethod · 0.80
isLockedMethod · 0.80

Tested by

no test coverage detected