Return null instead of throwing for getSupportedBiometryType on android

This commit is contained in:
Joel Arvidsson 2018-02-25 19:23:36 +01:00
parent d6544520f2
commit 0b1b1d3395
2 changed files with 4 additions and 5 deletions

View File

@ -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();
}

View File

@ -22,6 +22,9 @@ declare module 'react-native-keychain' {
options?: SecureOptions
): Promise<boolean>;
function getSupportedBiometryType(
): Promise<string>;
function setSecurePassword(
username: string,
password: string,