use getTotalAmount() instead of amount field

This commit is contained in:
Ivan Socolsky 2015-12-18 12:41:45 -03:00
parent 4b5bb8d53a
commit 88f972e7d3
1 changed files with 2 additions and 2 deletions

View File

@ -1241,7 +1241,7 @@ WalletService.prototype._selectTxInputs = function(txp, utxosToExclude, cb) {
}
if (totalAmount < txp.getTotalAmount()) return cb(Errors.INSUFFICIENT_FUNDS);
if (availableAmount < txp.amount) return cb(Errors.LOCKED_FUNDS);
if (availableAmount < txp.getTotalAmount()) return cb(Errors.LOCKED_FUNDS);
// Prepare UTXOs list
utxos = _.reject(utxos, 'locked');