diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2013-04-25 17:31:22 -0400 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2013-05-03 10:54:31 -0400 |
commit | 1f00f4e9c9b4b643da22bb5d9f94d66683fa1a15 (patch) | |
tree | 4ab3e19ea52f1f9267d75577c875cfbf2a41bc8c /src/qt/walletmodel.cpp | |
parent | 8de9bb53af32f7f6b09c06f831f2c0a7b4e95303 (diff) |
CreateTransaction: return strFailReason on failure
Diffstat (limited to 'src/qt/walletmodel.cpp')
-rw-r--r-- | src/qt/walletmodel.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index 20535a451d..fb3ffc5c91 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -181,7 +181,8 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(const QList<SendCoinsRecipie CWalletTx wtx; CReserveKey keyChange(wallet); int64 nFeeRequired = 0; - bool fCreated = wallet->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired); + std::string strFailReason; + bool fCreated = wallet->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired, strFailReason); if(!fCreated) { @@ -189,6 +190,8 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(const QList<SendCoinsRecipie { return SendCoinsReturn(AmountWithFeeExceedsBalance, nFeeRequired); } + emit message(tr("Send Coins"), QString::fromStdString(strFailReason), + CClientUIInterface::MSG_ERROR); return TransactionCreationFailed; } if(!uiInterface.ThreadSafeAskFee(nFeeRequired)) |