From 013753e1bc85c378f8674a07172b2123892150aa Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Mon, 15 Dec 2014 14:46:36 -0300 Subject: [PATCH] changed 'email' to 'username' for localstorage --- js/controllers/home.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/controllers/home.js b/js/controllers/home.js index 7ada0984c..ae40397e0 100644 --- a/js/controllers/home.js +++ b/js/controllers/home.js @@ -125,12 +125,14 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc if (err) { $rootScope.starting = false; copay.logger.warn(err); + + var identifier = $scope.usingLocalStorage ? 'username' : 'email'; if ((err.toString() || '').match('PNOTFOUND')) { - $scope.error = 'Invalid email or password'; + $scope.error = 'Invalid ' + identifier + ' or password'; if ($scope.attempt++ > 1) { var storage = $scope.usingLocalStorage ? 'this device storage' : 'cloud storage'; - $scope.error = 'Invalid email or password. You are trying to sign in using ' + storage + '. Change it on settings if necessary.'; + $scope.error = 'Invalid ' + identifier + ' or password. You are trying to sign in using ' + storage + '. Change it on settings if necessary.'; }; $rootScope.hasPin = false;