mirror of https://github.com/BTCPrivate/copay.git
paypro: differentiate safeUnspent and unspent.
This commit is contained in:
parent
324dfbc36a
commit
685c6e54dc
|
@ -927,16 +927,16 @@ Wallet.prototype.receivePaymentRequest = function(options, pr, cb) {
|
|||
raw: pr.serialize().toString('hex')
|
||||
};
|
||||
|
||||
return this.getUnspent(function(err, unspent) {
|
||||
return this.getUnspent(function(err, safeUnspent, unspent) {
|
||||
if (options.fetch) {
|
||||
if (!unspent || !unspent.length) {
|
||||
return cb(new Error('No unspent outputs available.'));
|
||||
}
|
||||
self.createPaymentTxSync(options, merchantData, unspent);
|
||||
self.createPaymentTxSync(options, merchantData, safeUnspent);
|
||||
return cb(null, merchantData, pr);
|
||||
}
|
||||
|
||||
var ntxid = self.createPaymentTxSync(options, merchantData, unspent);
|
||||
var ntxid = self.createPaymentTxSync(options, merchantData, safeUnspent);
|
||||
if (ntxid) {
|
||||
self.sendIndexes();
|
||||
self.sendTxProposal(ntxid);
|
||||
|
|
Loading…
Reference in New Issue