Browse Source

Merge pull request #424 from isocolsky/fix/input-selection

Use getTotalAmount() instead of amount field on input selection
activeAddress
Ivan Socolsky 9 years ago
parent
commit
84e061521e
  1. 4
      lib/server.js
  2. 2
      package.json

4
lib/server.js

@ -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');
@ -2088,7 +2088,7 @@ WalletService.prototype.getTxHistory = function(opts, cb) {
var self = this;
opts = opts || {};
opts.limit = (_.isUndefined(opts.limit) ? HISTORY_LIMIT : opts.limit);
opts.limit = (_.isUndefined(opts.limit) ? HISTORY_LIMIT : opts.limit);
if (opts.limit > HISTORY_LIMIT)
return cb(Errors.HISTORY_LIMIT_EXCEEDED);

2
package.json

@ -2,7 +2,7 @@
"name": "bitcore-wallet-service",
"description": "A service for Mutisig HD Bitcoin Wallets",
"author": "BitPay Inc",
"version": "1.3.1",
"version": "1.3.2",
"keywords": [
"bitcoin",
"copay",

Loading…
Cancel
Save