Fix console error at init

This commit is contained in:
Gustavo Maximiliano Cortez 2015-04-24 10:28:25 -03:00
commit 703022f054
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF

View file

@ -27,6 +27,8 @@ angular.module('copayApp.directives')
var URI = bitcore.URI;
var Address = bitcore.Address
var validator = function(value) {
if (!profileService.focusedClient)
return;
var networkName = profileService.focusedClient.credentials.network;
// Regular url
if (/^https?:\/\//.test(value)) {
@ -51,7 +53,6 @@ angular.module('copayApp.directives')
return;
}
console.log('[directives.js.53]', value, networkName); //TODO
// Regular Address
ctrl.$setValidity('validAddress', Address.isValid(value, networkName));
return value;