adde ruturn to signin if we not select a wallet before

This commit is contained in:
Mario Colque 2014-05-01 11:58:48 -03:00
commit 018e248dd1

View file

@ -1,10 +1,14 @@
'use strict';
angular.module('copay.password').controller('PasswordController',
function($scope, $rootScope, Passphrase, walletFactory, controllerUtils) {
function($scope, $rootScope, $location, Passphrase, walletFactory, controllerUtils) {
$scope.title = 'Password';
$scope.loading = false;
if (!$rootScope.openedWalletId) {
$location.path('signin');
}
$scope.getPassphrase = function() {
$scope.loading = true;
var passphrase = Passphrase.getBase64($scope.password);