spinner while derivating passphrase

This commit is contained in:
Matias Alejo Garcia 2014-05-07 18:48:56 -03:00
commit 6afcd8cc2e
7 changed files with 91 additions and 47 deletions

View file

@ -3,12 +3,12 @@
angular.module('copay.import').controller('ImportController',
function($scope, $rootScope, walletFactory, controllerUtils, Passphrase) {
$scope.title = 'Import a backup';
var reader = new FileReader();
var _importBackup = function(encryptedObj) {
var passphrase = Passphrase.getBase64($scope.password);
$rootScope.wallet = walletFactory.fromEncryptedObj(encryptedObj, passphrase);
controllerUtils.startNetwork($rootScope.wallet);
Passphrase.getBase64Async($scope.password, function(passphrase){
$rootScope.wallet = walletFactory.fromEncryptedObj(encryptedObj, passphrase);
controllerUtils.startNetwork($rootScope.wallet);
});
};
$scope.getFile = function() {
@ -44,8 +44,5 @@ angular.module('copay.import').controller('ImportController',
else {
_importBackup(backupText);
}
$scope.loading = false;
};
});