From 4f4fa56db4d3b1daaa9afc72c853776a15f1d157 Mon Sep 17 00:00:00 2001 From: Mario Colque Date: Thu, 1 May 2014 16:28:07 -0300 Subject: [PATCH] added password exists validation to join form --- js/controllers/signin.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/controllers/signin.js b/js/controllers/signin.js index af3406ecc..06584f8f6 100644 --- a/js/controllers/signin.js +++ b/js/controllers/signin.js @@ -34,11 +34,13 @@ angular.module('copay.signin').controller('SigninController', walletFactory.joinCreateSession($scope.connectionId, $scope.nickname, function(err,w) { $scope.loading = false; - if (err || !w) { + if (err || !w || !$scope.joinPassword) { if (err === 'joinError') $rootScope.flashMessage = { message: 'Can not find peer'}; else if (err === 'badSecret') $rootScope.flashMessage = { message: 'Bad secret secret string', type: 'error'}; + else if (!$scope.joinPassword) + $rootScope.flashMessage = { message: 'Enter your wallet password', type: 'error' }; else $rootScope.flashMessage = { message: 'Unknown error', type: 'error'}; controllerUtils.onErrorDigest();