diff --git a/Transaction.js b/Transaction.js index c16a2525c..f9c8e6914 100644 --- a/Transaction.js +++ b/Transaction.js @@ -736,6 +736,10 @@ Transaction.selectUnspent = function (utxos, totalNeededAmount, allowUnconfirmed maxConfirmations = minConfirmations; } while( !fulfill && minConfirmationSteps.length); + //TODO(?): sort ret and check is some inputs can be avoided. + //If the initial utxos are sorted, this step would be necesary only if + //utxos were selected from different minConfirmationSteps. + return fulfill ? ret : null; }