mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 09:50:15 +01:00
FIX: Biometrics listener release for some Android devices.
This commit is contained in:
parent
08bfecd8ce
commit
6f1f0326e4
@ -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…
Reference in New Issue
Block a user