SelfLender / react-native-biometrics

React Native module for iOS and Android biometrics
MIT License
648 stars 218 forks source link

SimplePromptCallback::onAuthenticationError doesn't return errorCode #124

Open GPVSensing opened 4 years ago

GPVSensing commented 4 years ago

@Override public void onAuthenticationError(int errorCode, @NonNull CharSequence errString) { super.onAuthenticationError(errorCode, errString); if (errorCode == BiometricPrompt.ERROR_NEGATIVE_BUTTON || errorCode == BiometricPrompt.ERROR_USER_CANCELED) { WritableMap resultMap = new WritableNativeMap(); resultMap.putBoolean("success", false); resultMap.putString("error", "User cancellation"); this.promise.resolve(resultMap); } else { this.promise.reject(errString.toString(), errString.toString()); Can we return errorCode also ?? } }

blueish9 commented 3 years ago

yes, I've created a PR for that