Merge pull request #4448 from matiu/bug/fix-validation-result
store profile if dirty after validation
This commit is contained in:
commit
f8d054ed11
2 changed files with 3 additions and 2 deletions
|
|
@ -1413,7 +1413,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
});
|
});
|
||||||
|
|
||||||
$rootScope.$on('Local/ValidatingWalletEnded', function(ev, walletId, isOK) {
|
$rootScope.$on('Local/ValidatingWalletEnded', function(ev, walletId, isOK) {
|
||||||
|
profileService.storeProfileIfDirty();
|
||||||
if (self.isInFocus(walletId)) {
|
if (self.isInFocus(walletId)) {
|
||||||
|
// NOTE: If the user changed the wallet, the flag is already turn off.
|
||||||
ongoingProcess.set('validatingWallet', false);
|
ongoingProcess.set('validatingWallet', false);
|
||||||
self.incorrectDerivation = isOK === false;
|
self.incorrectDerivation = isOK === false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -132,14 +132,13 @@ angular.module('copayApp.services')
|
||||||
skipDeviceValidation: skipDeviceValidation,
|
skipDeviceValidation: skipDeviceValidation,
|
||||||
}, function(err, isOK) {
|
}, function(err, isOK) {
|
||||||
$log.debug('ValidatingWallet End: ' + walletId + ' isOK:' + isOK);
|
$log.debug('ValidatingWallet End: ' + walletId + ' isOK:' + isOK);
|
||||||
$rootScope.$emit('Local/ValidatingWalletEnded', walletId, isOK);
|
|
||||||
|
|
||||||
if (isOK) {
|
if (isOK) {
|
||||||
root.profile.setChecked(platformInfo.ua, walletId);
|
root.profile.setChecked(platformInfo.ua, walletId);
|
||||||
} else {
|
} else {
|
||||||
$log.warn('Key Derivation failed for wallet:' + walletId);
|
$log.warn('Key Derivation failed for wallet:' + walletId);
|
||||||
storageService.clearLastAddress(walletId, function() {});
|
storageService.clearLastAddress(walletId, function() {});
|
||||||
}
|
}
|
||||||
|
$rootScope.$emit('Local/ValidatingWalletEnded', walletId, isOK);
|
||||||
});
|
});
|
||||||
}, 5000);
|
}, 5000);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue