add writelock to file operations

This commit is contained in:
Matias Alejo Garcia 2016-06-21 11:17:42 -03:00
commit f1e67ad0e6
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
3 changed files with 46 additions and 18 deletions

View file

@ -1407,16 +1407,14 @@ angular.module('copayApp.controllers').controller('indexController', function($r
});
$rootScope.$on('Local/ValidatingWallet', function(ev, walletId) {
if (self.isInFocus(walletId)) {
ongoingProcess.set('validatingWallet', true);
}
ongoingProcess.set('validatingWallet', true);
});
$rootScope.$on('Local/ValidatingWalletEnded', function(ev, walletId, isOK) {
profileService.storeProfileIfDirty();
ongoingProcess.set('validatingWallet', false);
if (self.isInFocus(walletId)) {
// NOTE: If the user changed the wallet, the flag is already turn off.
ongoingProcess.set('validatingWallet', false);
self.incorrectDerivation = isOK === false;
}
});