Merge pull request #304 from cmgustavo/bug/open-wallet
Sign-in when put a wrong password. Fixes #297
This commit is contained in:
commit
fa8c2eada5
3 changed files with 14 additions and 5 deletions
|
|
@ -23,11 +23,16 @@ angular.module('copay.signin').controller('SigninController',
|
|||
$rootScope.flashMessage = { message: 'Please, enter required fields', type: 'error'};
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.loading = true;
|
||||
var password = form.openPassword.$modelValue;
|
||||
|
||||
var passphrase = Passphrase.getBase64(password);
|
||||
var w = walletFactory.open($scope.selectedWalletId, { passphrase: passphrase});
|
||||
if (!w) {
|
||||
$scope.loading = false;
|
||||
$rootScope.flashMessage = { message: 'Bad password or connection error', type: 'error'};
|
||||
return;
|
||||
}
|
||||
controllerUtils.startNetwork(w);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue