Wallet encryption part 2: ask passphrase when needed, add menu options

This commit is contained in:
Wladimir J. van der Laan
2011-08-24 22:07:26 +02:00
parent 3f0816e3d9
commit b7bcaf940d
16 changed files with 582 additions and 9 deletions

View File

@@ -267,6 +267,14 @@ QString AddressTableModel::addRow(const QString &type, const QString &label, con
else if(type == Receive)
{
// Generate a new address to associate with given label
WalletModel::UnlockContext ctx(walletModel->requestUnlock());
if(!ctx.isValid())
{
// Unlock wallet failed or was cancelled
editStatus = WALLET_UNLOCK_FAILURE;
return QString();
}
strAddress = CBitcoinAddress(wallet->GetOrReuseKeyFromPool()).ToString();
}
else