implements skipping fields in backup imports

This commit is contained in:
Matias Alejo Garcia 2014-08-20 14:45:59 -04:00
commit 7f0e9cd03d
7 changed files with 171 additions and 115 deletions

View file

@ -21,5 +21,4 @@ angular.module('copayApp.controllers').controller('BackupController',
controllerUtils.logout();
});
};
});

View file

@ -7,6 +7,10 @@ angular.module('copayApp.controllers').controller('ImportController',
$scope.title = 'Import a backup';
$scope.importStatus = 'Importing wallet - Reading backup...';
var s = ($location.search()).skip;
if (s) {
$scope.skipFields = s.split(',');
}
var reader = new FileReader();
@ -22,7 +26,7 @@ angular.module('copayApp.controllers').controller('ImportController',
// try to import encrypted wallet with passphrase
try {
w = walletFactory.import(encryptedObj, passphrase);
w = walletFactory.import(encryptedObj, passphrase, $scope.skipFields);
} catch (e) {
errMsg = e.message;
}