Forbid split transactions

This commit is contained in:
tobtoht 2022-03-12 14:54:08 +01:00
parent 28c1973405
commit 0c02620e03
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C

View file

@ -25,6 +25,7 @@
#include "dialog/WalletCacheDebugDialog.h" #include "dialog/WalletCacheDebugDialog.h"
#include "dialog/UpdateDialog.h" #include "dialog/UpdateDialog.h"
#include "libwalletqt/AddressBook.h" #include "libwalletqt/AddressBook.h"
#include "libwalletqt/Transfer.h"
#include "utils/AppData.h" #include "utils/AppData.h"
#include "utils/AsyncTask.h" #include "utils/AsyncTask.h"
#include "utils/ColorScheme.h" #include "utils/ColorScheme.h"
@ -626,6 +627,15 @@ void MainWindow::onCreateTransactionSuccess(PendingTransaction *tx, const QVecto
m_ctx->wallet->disposeTransaction(tx); m_ctx->wallet->disposeTransaction(tx);
return; return;
} }
else if (tx->txCount() > 1) {
err = QString("%1 %2").arg(err, "Split transactions are not supported. Try sending a smaller amount.");
qDebug() << Q_FUNC_INFO << err;
this->displayWalletErrorMsg(err);
m_ctx->wallet->disposeTransaction(tx);
return;
}
m_ctx->addCacheTransaction(tx->txid()[0], tx->signedTxToHex(0)); m_ctx->addCacheTransaction(tx->txid()[0], tx->signedTxToHex(0));