File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import createError from './createError';
77
88const { ReactNativeFingerprintScanner } = NativeModules ;
99
10- const authCurrent = ( description ) => {
10+ const authCurrent = ( description , resolve , reject ) => {
1111 ReactNativeFingerprintScanner . authenticate ( description )
1212 . then ( ( ) => {
1313 resolve ( true ) ;
@@ -18,7 +18,7 @@ const authCurrent = (description) => {
1818 } ) ;
1919}
2020
21- const authLegacy = ( onAttempt ) => {
21+ const authLegacy = ( onAttempt , resolve , reject ) => {
2222 DeviceEventEmitter . addListener ( 'FINGERPRINT_SCANNER_AUTHENTICATION' , ( name ) => {
2323 if ( name === 'AuthenticationNotMatch' && typeof onAttempt === 'function' ) {
2424 onAttempt ( createError ( name ) ) ;
@@ -48,9 +48,9 @@ export default ({ description, onAttempt }) => {
4848 }
4949
5050 if ( Platform . Version < 23 ) {
51- return authLegacy ( onAttempt ) ;
51+ return authLegacy ( onAttempt , resolve , reject ) ;
5252 }
5353
54- return authCurrent ( description ) ;
54+ return authCurrent ( description , resolve , reject ) ;
5555 } ) ;
5656}
You can’t perform that action at this time.
0 commit comments