aboutsummaryrefslogtreecommitdiff
path: root/src/qt/sendcoinsdialog.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/sendcoinsdialog.cpp
parent3f0816e3d926e0ea78ac7b6cd43efe62355885c8 (diff)
downloadbitcoin-b7bcaf940d27fa8cfe89422943fbeaab7a350930.tar.xz
Wallet encryption part 2: ask passphrase when needed, add menu options
Diffstat (limited to 'src/qt/sendcoinsdialog.cpp')
-rw-r--r--src/qt/sendcoinsdialog.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index a9a89c282b..852d789805 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -6,6 +6,7 @@
#include "optionsmodel.h"
#include "sendcoinsentry.h"
#include "guiutil.h"
+#include "askpassphrasedialog.h"
#include <QMessageBox>
#include <QLocale>
@@ -84,6 +85,13 @@ void SendCoinsDialog::on_sendButton_clicked()
return;
}
+ WalletModel::UnlockContext ctx(model->requestUnlock());
+ if(!ctx.isValid())
+ {
+ // Unlock wallet was cancelled
+ return;
+ }
+
WalletModel::SendCoinsReturn sendstatus = model->sendCoins(recipients);
switch(sendstatus.status)
{
@@ -118,7 +126,6 @@ void SendCoinsDialog::on_sendButton_clicked()
tr("Error: Transaction creation failed "),
QMessageBox::Ok, QMessageBox::Ok);
break;
- break;
case WalletModel::TransactionCommitFailed:
QMessageBox::warning(this, tr("Send Coins"),
tr("Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."),