From f31a59e0b3764c547aff637cf5a56d7e7ef2d109 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 6 Aug 2014 16:42:44 -0700 Subject: [PATCH] paypro: another tentative commit to avoid regression. --- js/directives.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/directives.js b/js/directives.js index bf27a4620..7e1060849 100644 --- a/js/directives.js +++ b/js/directives.js @@ -17,6 +17,12 @@ 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);