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';
7
7
8
8
const { ReactNativeFingerprintScanner } = NativeModules ;
9
9
10
- const authCurrent = ( description ) => {
10
+ const authCurrent = ( description , resolve , reject ) => {
11
11
ReactNativeFingerprintScanner . authenticate ( description )
12
12
. then ( ( ) => {
13
13
resolve ( true ) ;
@@ -18,7 +18,7 @@ const authCurrent = (description) => {
18
18
} ) ;
19
19
}
20
20
21
- const authLegacy = ( onAttempt ) => {
21
+ const authLegacy = ( onAttempt , resolve , reject ) => {
22
22
DeviceEventEmitter . addListener ( 'FINGERPRINT_SCANNER_AUTHENTICATION' , ( name ) => {
23
23
if ( name === 'AuthenticationNotMatch' && typeof onAttempt === 'function' ) {
24
24
onAttempt ( createError ( name ) ) ;
@@ -48,9 +48,9 @@ export default ({ description, onAttempt }) => {
48
48
}
49
49
50
50
if ( Platform . Version < 23 ) {
51
- return authLegacy ( onAttempt ) ;
51
+ return authLegacy ( onAttempt , resolve , reject ) ;
52
52
}
53
53
54
- return authCurrent ( description ) ;
54
+ return authCurrent ( description , resolve , reject ) ;
55
55
} ) ;
56
56
}
You can’t perform that action at this time.
0 commit comments