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