mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-04 04:13:49 +01:00
ADD: console log biometrics related errors.
This commit is contained in:
parent
0ce3dd3bb8
commit
b3a7e889f7
1 changed files with 9 additions and 2 deletions
|
@ -23,7 +23,9 @@ function Biometric() {
|
||||||
if (isDeviceBiometricCapable) {
|
if (isDeviceBiometricCapable) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} catch {
|
} catch (e) {
|
||||||
|
console.log('Biometrics isDeviceBiometricCapable failed');
|
||||||
|
console.log(e);
|
||||||
Biometric.setBiometricUseEnabled(false);
|
Biometric.setBiometricUseEnabled(false);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -34,6 +36,7 @@ function Biometric() {
|
||||||
const isSensorAvailable = await FingerprintScanner.isSensorAvailable();
|
const isSensorAvailable = await FingerprintScanner.isSensorAvailable();
|
||||||
return isSensorAvailable;
|
return isSensorAvailable;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
console.log('Biometrics biometricType failed');
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -64,7 +67,11 @@ function Biometric() {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
FingerprintScanner.authenticate({ description: loc.settings.biom_conf_identity, fallbackEnabled: true })
|
FingerprintScanner.authenticate({ description: loc.settings.biom_conf_identity, fallbackEnabled: true })
|
||||||
.then(() => resolve(true))
|
.then(() => resolve(true))
|
||||||
.catch(() => resolve(false))
|
.catch(error => {
|
||||||
|
console.log('Biometrics authentication failed');
|
||||||
|
console.log(error);
|
||||||
|
resolve(false);
|
||||||
|
})
|
||||||
.finally(() => FingerprintScanner.release());
|
.finally(() => FingerprintScanner.release());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue