Merge pull request #2886 from cmgustavo/bug/password-error01

Fixes message error when password incorrect
This commit is contained in:
Matias Alejo Garcia 2015-06-13 10:53:02 -03:00
commit 466c79d0e9

View file

@ -378,13 +378,13 @@ angular.module('copayApp.services')
$log.debug('Wallet is encrypted'); $log.debug('Wallet is encrypted');
$rootScope.$emit('Local/NeedsPassword', false, function(err2, password) { $rootScope.$emit('Local/NeedsPassword', false, function(err2, password) {
if (err2 || !password) { if (err2 || !password) {
return cb(err2 || gettext('Password needed')); return cb({message: (err2 || gettext('Password needed'))});
} }
try { try {
fc.unlock(password); fc.unlock(password);
} catch (e) { } catch (e) {
$log.debug(e); $log.debug(e);
return cb(gettext('Wrong password')); return cb({message: gettext('Wrong password')});
} }
$timeout(function() { $timeout(function() {
if (fc.isPrivKeyEncrypted()) { if (fc.isPrivKeyEncrypted()) {