add updateIndex to model
This commit is contained in:
parent
45e44fba19
commit
0da641d1b8
4 changed files with 31 additions and 16 deletions
|
|
@ -36,10 +36,7 @@ angular.module('copayApp.controllers').controller('ImportController',
|
|||
$scope.error = 'Could not read wallet. Please check your password';
|
||||
} else {
|
||||
controllerUtils.installWalletHandlers($scope, wallet);
|
||||
updateStatus('Importing wallet - Scanning for transactions...');
|
||||
wallet.updateIndexes(function(err) {
|
||||
controllerUtils.setFocusedWallet(wallet);
|
||||
});
|
||||
controllerUtils.setFocusedWallet(wallet);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ angular.module('copayApp.controllers').controller('ImportProfileController',
|
|||
passphraseConfig: config.passphraseConfig,
|
||||
}, function(err, iden) {
|
||||
if (err && !iden) {
|
||||
$scope.loading = false;
|
||||
$scope.error = (err.toString() || '').match('BADSTR') ? 'Bad password or corrupt profile file' : 'Unknown error';
|
||||
} else {
|
||||
var firstWallet = iden.getLastFocusedWallet();
|
||||
|
|
@ -54,14 +55,13 @@ 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;
|
||||
}
|
||||
$rootScope.starting = true;
|
||||
|
||||
var backupFile = $scope.file;
|
||||
var backupText = form.backupText.$modelValue;
|
||||
var password = form.password.$modelValue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue