Skip to content

Commit 2487b16

Browse files
committed
remove check for > MAX_OUTPUTS so sends to wallet aren't prevented
1 parent 93d5382 commit 2487b16

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

util/ui.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -339,12 +339,6 @@ bool getOutputsToSend( const QString & accountName, int outputsNumber, int64_t n
339339
// Calculate what outputs need to be selected...
340340
if (freeNanoCoins >= nanoCoins + maxFee) {
341341
*txnFee = getTxnFeeFromSpendableOutputs(nanoCoins, freeOuts, outputsNumber, freeNanoCoins, resultOutputs);
342-
343-
// batch size check done inside of getTxnFeeFromSpendableOutputs is only possible error
344-
if (*txnFee == 0 && resultOutputs.size() == 0) {
345-
control::MessageBox::messageText(parent, "Send Amount", "We can't send such large amount of the coins in a single transaction because your outputs are too small. Please send smaller amount.");
346-
return false;
347-
}
348342
return true;
349343
}
350344

@@ -387,13 +381,6 @@ bool getOutputsToSend( const QString & accountName, int outputsNumber, int64_t n
387381
"Cancel", "Continue", true, false, 1.4) )
388382
return false;
389383

390-
// 1 - resulting output. outputsNumber - change outputs
391-
// Limit 500 will be checked on the waalet side
392-
if (hodlResultOutputs.size()+freeOuts.size() + outputsNumber + 1 > 498 ) {
393-
control::MessageBox::messageText(parent, "Send Amount", "We can't send such large amount of the coins in a single transaction because your outputs are too small. Please send smaller amount.");
394-
return false;
395-
}
396-
397384
// User approve the spending, preparing the list of outputs...
398385
resultOutputs = hodlResultOutputs;
399386
for ( const auto & o : freeOuts.values() )
@@ -518,7 +505,7 @@ uint64_t getTxnFeeFromSpendableOutputs(int64_t amount, const QMultiMap<int64_t,
518505
retrieveTransactionInputs(amount, spendableOutputs, &totalCoins, txnInputs);
519506

520507
uint64_t numInputs = txnInputs.size();
521-
if (numInputs == 0 || numInputs + resultOutputs + changeOutputs > mwc::MWC_MAX_OUTPUTS) {
508+
if (numInputs == 0) {
522509
return 0;
523510
}
524511

0 commit comments

Comments
 (0)