This commit is contained in:
Matias Alejo Garcia 2014-09-03 15:43:27 -03:00
commit f2cc272f16
7 changed files with 202 additions and 104 deletions

View file

@ -86,8 +86,9 @@ angular.module('copayApp.controllers').controller('CreateController',
privateKeyHex: $scope.private,
networkName: $scope.networkName,
};
var w = walletFactory.create(opts);
controllerUtils.startNetwork(w, $scope);
walletFactory.create(opts, function(err, w) {
controllerUtils.startNetwork(w, $scope);
});
});
};

View file

@ -16,19 +16,19 @@ angular.module('copayApp.controllers').controller('OpenController', function($sc
$scope.loading = false;
walletFactory.getWallets(function(wallets) {
$scope.wallets = wallets.sort(cmp);
});
walletFactory.storage.getLastOpened(function(ret) {
$scope.selectedWalletId = ret || ($scope.wallets[0] && $scope.wallets[0].id);
if (!$scope.wallets.length) {
$location.path('/');
}
walletFactory.storage.getLastOpened(function(ret) {
$scope.selectedWalletId = ret || ($scope.wallets[0] && $scope.wallets[0].id);
});
});
$scope.openPassword = '';
$scope.isMobile = !!window.cordova;
if (!$scope.wallets.length) {
$location.path('/');
}
$scope.open = function(form) {
if (form && form.$invalid) {
notification.error('Error', 'Please enter the required fields');