react-native-mdl-verification 1.0.4 → 1.0.6

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.
@@ -17,6 +17,9 @@ import androidx.activity.ComponentActivity
17
17
  class MdlVerificationBridge(reactContext: ReactApplicationContext) :
18
18
  ReactContextBaseJavaModule(reactContext) {
19
19
  private lateinit var coordinator: MdlVerificationCoordinator
20
+ private local_licenseKey: String
21
+ private local_applicationId: String
22
+
20
23
 
21
24
  companion object {
22
25
  private const val TAG = "MdlVerificationBridge"
@@ -51,7 +54,7 @@ class MdlVerificationBridge(reactContext: ReactApplicationContext) :
51
54
  map.putString("msoValid", response.msoValid ?: "")
52
55
  map.putString("cert", response.cert ?: "")
53
56
  map.putString("ica_cert", response.ica_cert ?: "")
54
- if (successMesg?.indexOf(INVALID_LIC") >=0) {
57
+ if (response?.successMesg?.indexOf(INVALID_LIC") >=0) {
55
58
  map.putString("licenseKey", response.licenseKey?: "")
56
59
  map.putString("applicationId", response.applicationId?: "")
57
60
  }
@@ -104,6 +107,8 @@ class MdlVerificationBridge(reactContext: ReactApplicationContext) :
104
107
 
105
108
  coordinator = MdlVerificationCoordinator(currentActivity)
106
109
  coordinator.initSDK(licenseKey)
110
+ local_licenseKey = licenseKey;
111
+ local_applicationId = currentActivity.getApplicationId();
107
112
 
108
113
  promise.resolve("SDK initialized successfully")
109
114
  Log.d(TAG, "SDK initialized successfully")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-mdl-verification",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "React Native bridge for MDL (Mobile Driver's License) verification using CheckMDL SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",