mirror of
https://github.com/status-im/react-native-keychain.git
synced 2025-02-05 09:53:45 +00:00
Return null instead of throwing for getSupportedBiometryType on android
This commit is contained in:
parent
d6544520f2
commit
0b1b1d3395
6
index.js
6
index.js
@ -87,11 +87,7 @@ export function canImplyAuthentication(options?: SecureOptions): Promise {
|
||||
*/
|
||||
export function getSupportedBiometryType(): Promise {
|
||||
if (Platform.OS !== 'ios') {
|
||||
return Promise.reject(
|
||||
new Error(
|
||||
`getSupportedBiometryType() is not supported on ${Platform.OS} yet`
|
||||
)
|
||||
);
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
return RNKeychainManager.getSupportedBiometryType();
|
||||
}
|
||||
|
3
typings/react-native-keychain.d.ts
vendored
3
typings/react-native-keychain.d.ts
vendored
@ -22,6 +22,9 @@ declare module 'react-native-keychain' {
|
||||
options?: SecureOptions
|
||||
): Promise<boolean>;
|
||||
|
||||
function getSupportedBiometryType(
|
||||
): Promise<string>;
|
||||
|
||||
function setSecurePassword(
|
||||
username: string,
|
||||
password: string,
|
||||
|
Loading…
x
Reference in New Issue
Block a user