aboutsummaryrefslogtreecommitdiff
path: root/src/qt/addresstablemodel.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-08-24 22:07:26 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2011-08-31 14:19:43 +0200
commitb7bcaf940d27fa8cfe89422943fbeaab7a350930 (patch)
tree73f01425d448afe9f523a434420cfd09e32406e6 /src/qt/addresstablemodel.cpp
parent3f0816e3d926e0ea78ac7b6cd43efe62355885c8 (diff)
downloadbitcoin-b7bcaf940d27fa8cfe89422943fbeaab7a350930.tar.xz
Wallet encryption part 2: ask passphrase when needed, add menu options
Diffstat (limited to 'src/qt/addresstablemodel.cpp')
-rw-r--r--src/qt/addresstablemodel.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qt/addresstablemodel.cpp b/src/qt/addresstablemodel.cpp
index bd314ba0f0..6bda1e770c 100644
--- a/src/qt/addresstablemodel.cpp
+++ b/src/qt/addresstablemodel.cpp
@@ -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