From 2b5102a493c665147f1f275d922b913d236c10df Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 6 Aug 2014 16:40:32 -0700 Subject: [PATCH] paypro: tentatively reimplement commit that caused regression. --- js/models/core/Wallet.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/models/core/Wallet.js b/js/models/core/Wallet.js index c6a114c91..15e39040a 100644 --- a/js/models/core/Wallet.js +++ b/js/models/core/Wallet.js @@ -933,6 +933,9 @@ Wallet.prototype.receivePaymentRequest = function(options, pr, cb) { return this.getUnspent(function(err, unspent) { if (options.fetch) { + if (!unspent || !unspent.length) { + return cb(new Error('No unspent outputs.')); + } self.createPaymentTxSync(options, merchantData, unspent); return cb(null, merchantData, pr); }