@reclaimprotocol/inapp-rn-sdk 0.1.6 → 0.1.7
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.
|
@@ -185,10 +185,10 @@ class InappRnSdkModule(private val reactContext: ReactApplicationContext) :
|
|
|
185
185
|
featureOptions = if (featureOptions == null) null else ReclaimOverrides.FeatureOptions(
|
|
186
186
|
cookiePersist = getBoolean(featureOptions, "cookiePersist"),
|
|
187
187
|
singleReclaimRequest = getBoolean(featureOptions, "singleReclaimRequest"),
|
|
188
|
-
idleTimeThresholdForManualVerificationTrigger =
|
|
188
|
+
idleTimeThresholdForManualVerificationTrigger = getNumber(
|
|
189
189
|
featureOptions, "idleTimeThresholdForManualVerificationTrigger"
|
|
190
190
|
)?.toLong(),
|
|
191
|
-
sessionTimeoutForManualVerificationTrigger =
|
|
191
|
+
sessionTimeoutForManualVerificationTrigger = getNumber(
|
|
192
192
|
featureOptions, "sessionTimeoutForManualVerificationTrigger"
|
|
193
193
|
)?.toLong(),
|
|
194
194
|
attestorBrowserRpcUrl = getString(featureOptions, "attestorBrowserRpcUrl"),
|
|
@@ -304,12 +304,15 @@ class InappRnSdkModule(private val reactContext: ReactApplicationContext) :
|
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
-
private fun
|
|
308
|
-
|
|
309
|
-
null
|
|
310
|
-
}
|
|
311
|
-
|
|
307
|
+
private fun getNumber(map: ReadableMap, key: String): Number? {
|
|
308
|
+
if (!map.hasKey(key) || map.isNull(key)) {
|
|
309
|
+
return null
|
|
310
|
+
}
|
|
311
|
+
val value = map.toHashMap()[key]
|
|
312
|
+
if (value is Number) {
|
|
313
|
+
return value
|
|
312
314
|
}
|
|
315
|
+
throw TypeCastException("Value for key $key is not a Number")
|
|
313
316
|
}
|
|
314
317
|
|
|
315
318
|
private fun getString(map: ReadableMap, key: String): String? {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reclaimprotocol/inapp-rn-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Reclaim Protocol's InApp React Native SDK for ZK proof generations for requests with an in-app experience of web verification",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/commonjs/index.js",
|