|
@ -941,7 +941,10 @@ WalletService.prototype._selectTxInputs = function(txp, utxosToExclude, cb) { |
|
|
self.getUtxos({}, function(err, utxos) { |
|
|
self.getUtxos({}, function(err, utxos) { |
|
|
if (err) return cb(err); |
|
|
if (err) return cb(err); |
|
|
|
|
|
|
|
|
var excludeIndex = _.reduce(utxosToExclude, function(res, val) { res[val] = val; return res; }, {}); |
|
|
var excludeIndex = _.reduce(utxosToExclude, function(res, val) { |
|
|
|
|
|
res[val] = val; |
|
|
|
|
|
return res; |
|
|
|
|
|
}, {}); |
|
|
|
|
|
|
|
|
utxos = _.reject(utxos, function(utxo) { |
|
|
utxos = _.reject(utxos, function(utxo) { |
|
|
return excludeIndex[utxo.txid + ":" + utxo.vout]; |
|
|
return excludeIndex[utxo.txid + ":" + utxo.vout]; |
|
@ -1817,10 +1820,12 @@ WalletService.prototype.scan = function(opts, cb) { |
|
|
}); |
|
|
}); |
|
|
if (opts.includeCopayerBranches) { |
|
|
if (opts.includeCopayerBranches) { |
|
|
_.each(wallet.copayers, function(copayer) { |
|
|
_.each(wallet.copayers, function(copayer) { |
|
|
|
|
|
if (copayer.addressManager.supportsDerivation()) { |
|
|
derivators.push({ |
|
|
derivators.push({ |
|
|
derive: _.bind(copayer.createAddress, copayer, wallet, isChange), |
|
|
derive: _.bind(copayer.createAddress, copayer, wallet, isChange), |
|
|
rewind: _.bind(copayer.addressManager.rewindIndex, copayer.addressManager, isChange), |
|
|
rewind: _.bind(copayer.addressManager.rewindIndex, copayer.addressManager, isChange), |
|
|
}); |
|
|
}); |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|