Skip to content

Commit

Permalink
Transaction large error message change
Browse files Browse the repository at this point in the history
  • Loading branch information
levoncrypto committed May 7, 2024
1 parent 7fb07bf commit 8d624d3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/qt/bitcoinstrings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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", "This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again"),

This comment has been minimized.

Copy link
@erciccione

erciccione May 9, 2024

Contributor

This is a very technical message. I suggest to keep the original "transaction is too large" and maybe offer some more details. The suggested message will be understood only by technical people and will confuse the rest.

This comment has been minimized.

Copy link
@erciccione

erciccione May 9, 2024

Contributor

I suggest something like 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."),
Expand Down
4 changes: 2 additions & 2 deletions src/spark/sparkwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ bool CSparkWallet::CreateSparkMintTransactions(
// Limit size
CTransaction txConst(tx);
if (GetTransactionWeight(txConst) >= MAX_STANDARD_TX_WEIGHT) {
strFailReason = _("Transaction too large");
strFailReason = _("This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again");
return false;
}
dPriority = txConst.ComputePriority(dPriority, nBytes);
Expand Down Expand Up @@ -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(_("This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again"));
}

// check fee
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/lelantusjoinsplitbuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(_("This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again"));
}

// check fee
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/txbuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ CWalletTx TxBuilder::Build(const std::vector<CRecipient>& 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(_("This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again"));
}

// check fee
Expand Down
6 changes: 3 additions & 3 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4566,7 +4566,7 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletT

if (GetTransactionWeight(txNew) >= MAX_STANDARD_TX_WEIGHT) {
// Do not create oversized transactions (bad-txns-oversize).
strFailReason = _("Transaction too large");
strFailReason = _("This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again");
return false;
}

Expand Down Expand Up @@ -4991,7 +4991,7 @@ bool CWallet::CreateMintTransaction(const std::vector <CRecipient> &vecSend, CWa

// Limit size
if (GetTransactionWeight(*wtxNew.tx) >= MAX_STANDARD_TX_WEIGHT) {
strFailReason = _("Transaction too large");
strFailReason = _("This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again");
return false;
}
dPriority = wtxNew.tx->ComputePriority(dPriority, nBytes);
Expand Down Expand Up @@ -5271,7 +5271,7 @@ bool CWallet::CreateLelantusMintTransactions(
// Limit size
CTransaction txConst(tx);
if (GetTransactionWeight(txConst) >= MAX_STANDARD_TX_WEIGHT) {
strFailReason = _("Transaction too large");
strFailReason = _("This transaction exceeds the transaction size limit of 100 kB, please select less inputs or consolidate your UTXOs before trying to send again");
return false;
}
dPriority = txConst.ComputePriority(dPriority, nBytes);
Expand Down

0 comments on commit 8d624d3

Please sign in to comment.