paypro: allow payment protocol addresses in address input.
This commit is contained in:
parent
4d244a03f8
commit
ad64ad1e0e
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue