add advanced options to import
This commit is contained in:
parent
96b841bd51
commit
db1b7d7c45
3 changed files with 40 additions and 9 deletions
|
|
@ -7,10 +7,7 @@ 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(',');
|
||||
}
|
||||
$scope.hideAdv=true;
|
||||
|
||||
var reader = new FileReader();
|
||||
|
||||
|
|
@ -24,9 +21,20 @@ angular.module('copayApp.controllers').controller('ImportController',
|
|||
updateStatus('Importing wallet - Setting things up...');
|
||||
var w, errMsg;
|
||||
|
||||
var skipFields = [];
|
||||
if ($scope.skipPublicKeyRing)
|
||||
skipFields.push('publicKeyRing');
|
||||
|
||||
if ($scope.skipTxProposals)
|
||||
skipFields.push('txProposals');
|
||||
|
||||
if ($scope.skipPrivateKey)
|
||||
skipFields.push('privateKey');
|
||||
|
||||
console.log('[import.js.36:skipFields:]',skipFields); //TODO
|
||||
// try to import encrypted wallet with passphrase
|
||||
try {
|
||||
w = walletFactory.import(encryptedObj, passphrase, $scope.skipFields);
|
||||
w = walletFactory.import(encryptedObj, passphrase, skipFields);
|
||||
} catch (e) {
|
||||
errMsg = e.message;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue