assentify-sdk-react-native 0.0.22 → 0.0.23

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.
package/README.md CHANGED
@@ -93,6 +93,9 @@ yarn add assentify-sdk-react-native
93
93
 
94
94
  ## Versions
95
95
 
96
+ **0.0.23**
97
+ - Submit Improvements
98
+
96
99
  **0.0.22**
97
100
  - Packages Update
98
101
 
@@ -287,6 +287,7 @@ class AssentifySdkModule(context: ReactApplicationContext) :
287
287
  val json: String = sharedStepDefinitions.getString("Steps", "")!!
288
288
  val steps: List<StepDefinitions>? =
289
289
  gson.fromJson(json, object : TypeToken<List<StepDefinitions>>() {}.type)
290
+ val keyPrefix = "_OnBoardMe_Property_"
290
291
 
291
292
  steps!!.forEach { item ->
292
293
  // ** Context Aware Signing *//
@@ -338,9 +339,13 @@ class AssentifySdkModule(context: ReactApplicationContext) :
338
339
  if (property.key.contains(BlockLoaderKeys.InteractionID)) {
339
340
  values.put(property.key, configModel.instanceId)
340
341
  }
341
- for ((keyData, valueData) in mapData) {
342
- if (property.key.contains(keyData)) {
343
- values.put(property.key, valueData.toString())
342
+ property.key.indexOf(keyPrefix).takeIf { it != -1 }?.let { index ->
343
+ val realKey = property.key.substring(index + keyPrefix.length)
344
+ for ((keyData, valueData) in mapData) {
345
+ if (realKey == keyData) {
346
+ values[property.key] = valueData.toString()
347
+ break
348
+ }
344
349
  }
345
350
  }
346
351
  }
@@ -362,11 +362,15 @@ class NativeAssentifySdk: RCTEventEmitter ,AssentifySdkDelegate , SubmitDataDel
362
362
  extractedInformationBlockLoader[property.key] = self.configModel?.instanceId
363
363
  }
364
364
  if !data.isEmpty {
365
- for (keyData, valueData) in data {
366
- if property.key.contains(keyData) {
367
- extractedInformationBlockLoader[property.key] = String(describing: valueData)
368
- }
369
- }
365
+ if let range = property.key.range(of: "_OnBoardMe_Property_") {
366
+ let realKey = String(property.key[range.upperBound...])
367
+ for (keyData, valueData) in data {
368
+ if realKey == keyData {
369
+ extractedInformationBlockLoader[property.key] = String(describing: valueData)
370
+ break
371
+ }
372
+ }
373
+ }
370
374
  }
371
375
  })
372
376
 
@@ -1 +1 @@
1
- {"version":3,"file":"Home.d.ts","sourceRoot":"","sources":["../../../../example/src/Home.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAqBnD,QAAA,MAAM,IAAI,yBA2PT,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Home.d.ts","sourceRoot":"","sources":["../../../../example/src/Home.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAqBnD,QAAA,MAAM,IAAI,yBAyPT,CAAC;AAEF,eAAe,IAAI,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assentify-sdk-react-native",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "description": "This package provides integration with Assentify's services, allowing developers to incorporate Assentify functionalities seamlessly into their applications.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",