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
parent e2af5ac782
commit 06a01fb48d
1 changed files with 2 additions and 1 deletions

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;
};