From 06a01fb48d54fca7af360168c097a67ef2159355 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Fri, 19 Sep 2014 12:13:09 -0300 Subject: [PATCH] Invalidate bitcoin addresses on the input field of join a wallet. --- js/directives.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/directives.js b/js/directives.js index 27a4a131c..b4b1a84a3 100644 --- a/js/directives.js +++ b/js/directives.js @@ -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; };