react-native-okhi 1.2.18-beta.1 → 1.2.18-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -126,8 +126,8 @@ repositories {
126
126
  dependencies {
127
127
  //noinspection GradleDynamicVersion
128
128
  implementation "com.facebook.react:react-native:+"
129
- implementation 'io.okhi.android:core:1.7.19-beta'
130
- implementation 'io.okhi.android:okverify:1.9.46-beta'
129
+ implementation 'io.okhi.android:core:1.7.23'
130
+ implementation 'io.okhi.android:okverify:1.9.48'
131
131
  // From node_modules
132
132
  }
133
133
 
@@ -34,6 +34,7 @@ import io.okhi.android_core.models.OkHiException;
34
34
  import io.okhi.android_core.models.OkHiLocation;
35
35
  import io.okhi.android_core.models.OkHiPermissionService;
36
36
  import io.okhi.android_core.models.OkHiUser;
37
+ import io.okhi.android_core.models.OkHiVerificationType;
37
38
  import io.okhi.android_core.models.OkPreference;
38
39
  import io.okhi.android_okverify.OkVerify;
39
40
  import io.okhi.android_okverify.interfaces.OkVerifyCallback;
@@ -200,8 +201,15 @@ public class OkhiModule extends ReactContextBaseJavaModule {
200
201
  return;
201
202
  }
202
203
  OkHiUser user = new OkHiUser.Builder(phoneNumber).build();
203
- OkHiLocation location = new OkHiLocation.Builder(locationId, lat, lon).build();
204
- okVerify.start(user, location, processVerificationTypes(verificationTypes), new OkVerifyCallback<String>() {
204
+ String[] verificationTypesList = new String[verificationTypes.size()];
205
+ for (int i = 0; i < verificationTypes.size(); i++) {
206
+ verificationTypesList[i] = verificationTypes.getString(i);
207
+ }
208
+ if (verificationTypesList.length == 0) {
209
+ verificationTypesList = new String[]{OkHiVerificationType.digital.name()};
210
+ }
211
+ OkHiLocation location = new OkHiLocation.Builder(locationId, lat, lon).setVerificationTypes(verificationTypesList).build();
212
+ okVerify.start(user, location, new OkVerifyCallback<String>() {
205
213
  @Override
206
214
  public void onSuccess(String result) {
207
215
  promise.resolve(result);
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "okhiWebReactNative",
3
- "version": "1.2.18-beta.1"
3
+ "version": "1.2.18-beta.2"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "okhiWebReactNative",
3
- "version": "1.2.18-beta.1"
3
+ "version": "1.2.18-beta.2"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-okhi",
3
- "version": "1.2.18-beta.1",
3
+ "version": "1.2.18-beta.2",
4
4
  "description": "The OkHi React Native library enables you to collect and verify addresses from your users",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
17
17
  s.source_files = "ios/**/*.{h,m,mm,swift}"
18
18
 
19
19
  s.dependency "React-Core"
20
- s.dependency "OkHi", "1.9.37-beta"
20
+ s.dependency "OkHi", "1.9.38"
21
21
 
22
22
  # Don't install the dependencies when we run `pod install` in the old architecture.
23
23
  if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "okhiWebReactNative",
3
- "version": "1.2.18-beta.1"
3
+ "version": "1.2.18-beta.2"
4
4
  }