mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Wallet encryption part 2: ask passphrase when needed, add menu options
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user