Skip to content

Commit 4a22b4d

Browse files
rajaishwaryfkotsian
authored andcommitted
pass required args (#117)
1 parent 57556a4 commit 4a22b4d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/authenticate.android.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import createError from './createError';
77

88
const { 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
}

0 commit comments

Comments
 (0)