1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-23 19:53:43 +00:00

Correctly set biometric state on connect failure

This commit is contained in:
Hinton
2020-11-30 13:41:08 +01:00
parent 951e2f0e51
commit 7c468de97c
3 changed files with 15 additions and 7 deletions

View File

@@ -208,10 +208,6 @@ export class SettingsComponent implements OnInit {
async updateBiometric() {
if (this.biometric) {
this.biometric = false;
await this.storageService.remove(ConstantsService.biometricUnlockKey);
this.vaultTimeoutService.biometricLocked = false;
} else {
const submitted = Swal.fire({
heightAuto: false,
buttonsStyling: false,
@@ -242,8 +238,14 @@ export class SettingsComponent implements OnInit {
if (this.biometric === false) {
this.platformUtilsService.showToast('error', this.i18nService.t('errorEnableBiometricTitle'), this.i18nService.t('errorEnableBiometricDesc'));
}
}).catch((e) => {
// Handle connection errors
this.biometric = false;
})
]);
} else {
await this.storageService.remove(ConstantsService.biometricUnlockKey);
this.vaultTimeoutService.biometricLocked = false;
}
}