From cf19353555dea925fcadb4381f5ac5fa9c87cc47 Mon Sep 17 00:00:00 2001 From: levoncrypto <95240473+levoncrypto@users.noreply.github.com> Date: Mon, 13 May 2024 18:55:44 +0400 Subject: [PATCH] Transaction large error message change (#1438) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Transaction large error message change * Đ•diting error message --- src/qt/bitcoinstrings.cpp | 2 +- src/spark/sparkwallet.cpp | 4 ++-- src/wallet/lelantusjoinsplitbuilder.cpp | 2 +- src/wallet/txbuilder.cpp | 2 +- src/wallet/wallet.cpp | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp index a26f1cf886..6b4d5aff98 100644 --- a/src/qt/bitcoinstrings.cpp +++ b/src/qt/bitcoinstrings.cpp @@ -553,7 +553,7 @@ QT_TRANSLATE_NOOP("firo-core", "Transaction has too long of a mempool chain"), QT_TRANSLATE_NOOP("firo-core", "Transaction must have at least one recipient"), QT_TRANSLATE_NOOP("firo-core", "Transaction not valid."), QT_TRANSLATE_NOOP("firo-core", "Transaction too large for fee policy"), -QT_TRANSLATE_NOOP("firo-core", "Transaction too large"), +QT_TRANSLATE_NOOP("firo-core", "Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs"), QT_TRANSLATE_NOOP("firo-core", "Trying to spend an already spent serial #, try again."), QT_TRANSLATE_NOOP("firo-core", "Unable to bind to %s on this computer (bind returned error %s)"), QT_TRANSLATE_NOOP("firo-core", "Unable to bind to %s on this computer. %s is probably already running."), diff --git a/src/spark/sparkwallet.cpp b/src/spark/sparkwallet.cpp index 23bd19ab49..0852256861 100644 --- a/src/spark/sparkwallet.cpp +++ b/src/spark/sparkwallet.cpp @@ -1024,7 +1024,7 @@ bool CSparkWallet::CreateSparkMintTransactions( // Limit size CTransaction txConst(tx); if (GetTransactionWeight(txConst) >= MAX_STANDARD_TX_WEIGHT) { - strFailReason = _("Transaction too large"); + strFailReason = _("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs"); return false; } dPriority = txConst.ComputePriority(dPriority, nBytes); @@ -1536,7 +1536,7 @@ CWalletTx CSparkWallet::CreateSparkSpendTransaction( } if (GetTransactionWeight(tx) >= MAX_NEW_TX_WEIGHT) { - throw std::runtime_error(_("Transaction too large")); + throw std::runtime_error(_("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs")); } // check fee diff --git a/src/wallet/lelantusjoinsplitbuilder.cpp b/src/wallet/lelantusjoinsplitbuilder.cpp index a10eb4483f..eba439524c 100644 --- a/src/wallet/lelantusjoinsplitbuilder.cpp +++ b/src/wallet/lelantusjoinsplitbuilder.cpp @@ -321,7 +321,7 @@ CWalletTx LelantusJoinSplitBuilder::Build( result.SetTx(MakeTransactionRef(tx)); if (GetTransactionWeight(tx) >= MAX_NEW_TX_WEIGHT) { - throw std::runtime_error(_("Transaction too large")); + throw std::runtime_error(_("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs")); } // check fee diff --git a/src/wallet/txbuilder.cpp b/src/wallet/txbuilder.cpp index 1419db6cbf..637bc26a14 100644 --- a/src/wallet/txbuilder.cpp +++ b/src/wallet/txbuilder.cpp @@ -224,7 +224,7 @@ CWalletTx TxBuilder::Build(const std::vector& recipients, CAmount& f result.SetTx(MakeTransactionRef(tx)); if (GetTransactionWeight(tx) >= MAX_STANDARD_TX_WEIGHT) { - throw std::runtime_error(_("Transaction too large")); + throw std::runtime_error(_("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs")); } // check fee diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index fababfae30..0aa4b89c96 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -4566,7 +4566,7 @@ bool CWallet::CreateTransaction(const std::vector& vecSend, CWalletT if (GetTransactionWeight(txNew) >= MAX_STANDARD_TX_WEIGHT) { // Do not create oversized transactions (bad-txns-oversize). - strFailReason = _("Transaction too large"); + strFailReason = _("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs"); return false; } @@ -4991,7 +4991,7 @@ bool CWallet::CreateMintTransaction(const std::vector &vecSend, CWa // Limit size if (GetTransactionWeight(*wtxNew.tx) >= MAX_STANDARD_TX_WEIGHT) { - strFailReason = _("Transaction too large"); + strFailReason = _("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs"); return false; } dPriority = wtxNew.tx->ComputePriority(dPriority, nBytes); @@ -5271,7 +5271,7 @@ bool CWallet::CreateLelantusMintTransactions( // Limit size CTransaction txConst(tx); if (GetTransactionWeight(txConst) >= MAX_STANDARD_TX_WEIGHT) { - strFailReason = _("Transaction too large"); + strFailReason = _("Transaction is too large (size limit: 100Kb). Select less inputs or consolidate your UTXOs"); return false; } dPriority = txConst.ComputePriority(dPriority, nBytes);