From ab06e8b4ea7d29c861520840c749365be96ee937 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 6 Aug 2014 16:30:58 -0700 Subject: [PATCH] Revert "paypro: deal with no unspent outputs. see #1043." This reverts commit 6b5a618f0f7155c11ee734ef54ab3876b5923768. --- js/directives.js | 6 ------ js/models/core/Wallet.js | 3 --- 2 files changed, 9 deletions(-) diff --git a/js/directives.js b/js/directives.js index f30f5ef8b..bf27a4620 100644 --- a/js/directives.js +++ b/js/directives.js @@ -17,12 +17,6 @@ angular.module('copayApp.directives') // Is this a payment protocol URI (BIP-72)? if (uri && uri.merchant) { scope.wallet.fetchPaymentTx(uri.merchant, function(err, merchantData) { - if ((err && err.message === 'No unspent outputs.') - || scope.availableBalance < +merchantData.total) { - ctrl.$setValidity('validAddress', false); - return; - } - if (err) { if (scope._resetPayPro) scope._resetPayPro(); ctrl.$setValidity('validAddress', false); diff --git a/js/models/core/Wallet.js b/js/models/core/Wallet.js index 15e39040a..c6a114c91 100644 --- a/js/models/core/Wallet.js +++ b/js/models/core/Wallet.js @@ -933,9 +933,6 @@ 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); }