From ad64ad1e0ef0d7b463ea68f750657d7ea2debf0e Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 30 Jul 2014 14:33:28 -0700 Subject: [PATCH] paypro: allow payment protocol addresses in address input. --- js/directives.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/directives.js b/js/directives.js index 03681d02b..ec78dffef 100644 --- a/js/directives.js +++ b/js/directives.js @@ -12,6 +12,11 @@ angular.module('copayApp.directives') require: 'ngModel', link: function(scope, elem, attrs, ctrl) { var validator = function(value) { + // Is payment protocol address? + if (value.indexOf('bitcoin:') === 0 && /r=/.test(value)) { + ctrl.$setValidity('validAddress', true); + return value; + } var a = new Address(value); ctrl.$setValidity('validAddress', a.isValid() && a.network().name === config.networkName); return value;