Changeset View
Changeset View
Standalone View
Standalone View
src/qt/walletmodel.cpp
Show First 20 Lines • Show All 321 Lines • ▼ Show 20 Lines | WalletModel::EncryptionStatus WalletModel::getEncryptionStatus() const { | ||||
} else { | } else { | ||||
return Unlocked; | return Unlocked; | ||||
} | } | ||||
} | } | ||||
bool WalletModel::setWalletEncrypted(bool encrypted, | bool WalletModel::setWalletEncrypted(bool encrypted, | ||||
const SecureString &passphrase) { | const SecureString &passphrase) { | ||||
if (encrypted) { | if (encrypted) { | ||||
// Encrypt | |||||
return m_wallet->encryptWallet(passphrase); | return m_wallet->encryptWallet(passphrase); | ||||
} else { | |||||
// Decrypt -- TODO; not supported yet | |||||
return false; | |||||
} | } | ||||
return false; | |||||
} | } | ||||
bool WalletModel::setWalletLocked(bool locked, const SecureString &passPhrase) { | bool WalletModel::setWalletLocked(bool locked, const SecureString &passPhrase) { | ||||
if (locked) { | if (locked) { | ||||
// Lock | // Lock | ||||
return m_wallet->lock(); | return m_wallet->lock(); | ||||
} else { | } else { | ||||
// Unlock | // Unlock | ||||
▲ Show 20 Lines • Show All 179 Lines • Show Last 20 Lines |