Invalidate bitcoin addresses on the input field of join a wallet.

This commit is contained in:
Gustavo Maximiliano Cortez 2014-09-19 12:13:09 -03:00
commit 06a01fb48d

View file

@ -88,7 +88,8 @@ angular.module('copayApp.directives')
require: 'ngModel',
link: function(scope, elem, attrs, ctrl) {
var validator = function(value) {
ctrl.$setValidity('walletSecret', Boolean(walletFactory.decodeSecret(value)));
var a = new Address(value);
ctrl.$setValidity('walletSecret', !a.isValid() && Boolean(walletFactory.decodeSecret(value)));
return value;
};