fix import wallet

This commit is contained in:
Gustavo Maximiliano Cortez 2014-12-15 10:48:41 -03:00
commit e5f4844ca5
4 changed files with 26 additions and 19 deletions

View file

@ -50,8 +50,10 @@ angular.module('copayApp.controllers').controller('ImportProfileController',
};
$scope.import = function(form) {
$scope.loading = true;
if (form.$invalid) {
$scope.loading = false;
$scope.error = 'Please enter the required fields';
return;
}
@ -60,11 +62,11 @@ angular.module('copayApp.controllers').controller('ImportProfileController',
var password = form.password.$modelValue;
if (!backupFile && !backupText) {
$scope.loading = false;
$scope.error = 'Please, select your backup file';
return;
}
$scope.loading = true;
$timeout(function() {
if (backupFile) {
reader.readAsBinaryString(backupFile);