1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +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

@@ -152,10 +152,16 @@ export default class MainBackground {
this.systemService.clearClipboard(clipboardValue, clearMs);
}
},
() => {
async () => {
if (this.nativeMessagingBackground != null) {
const promise = this.nativeMessagingBackground.getResponse();
this.nativeMessagingBackground.send({command: 'biometricUnlock'})
try {
await this.nativeMessagingBackground.send({command: 'biometricUnlock'});
} catch (e) {
return Promise.reject(e);
}
return promise.then((result) => result.response === 'unlocked');
}
});