mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-04 04:13:49 +01:00
FIX: Biometrics listener release for some Android devices.
This commit is contained in:
parent
08bfecd8ce
commit
6f1f0326e4
1 changed files with 6 additions and 6 deletions
|
@ -59,12 +59,12 @@ export default class Biometric {
|
|||
static async unlockWithBiometrics() {
|
||||
const isDeviceBiometricCapable = await Biometric.isDeviceBiometricCapable();
|
||||
if (isDeviceBiometricCapable) {
|
||||
try {
|
||||
const isConfirmed = await FingerprintScanner.authenticate({ description: 'Please confirm your identity.', fallbackEnabled: true });
|
||||
return isConfirmed;
|
||||
} catch (_e) {
|
||||
return false;
|
||||
}
|
||||
return new Promise(resolve => {
|
||||
FingerprintScanner.authenticate({ description: 'Please confirm your identity.', fallbackEnabled: true })
|
||||
.then(() => resolve(true))
|
||||
.catch(() => resolve(false))
|
||||
.finally(() => FingerprintScanner.release());
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue