Skip to content

Commit 4f09084

Browse files
authored
Merge pull request #43 from reclaimprotocol/pre-0.25.1
Fix createSession overrides
2 parents 9d4b778 + 974a2b5 commit 4f09084

File tree

5 files changed

+511
-30
lines changed

5 files changed

+511
-30
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.25.1
2+
3+
* Make all fields in FeatureOverrides optional
4+
* Fix `createSession` overrides
5+
16
## 0.25.0
27

38
* Add options locale, and useTeeOperator when using `setVerificationOptions` method.

ios/inapp_rn_sdk/Api.swift

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -611,31 +611,29 @@ public class OverridenSessionManagement: NSObject {
611611
) -> Void
612612
) {
613613
let replyId = Api.setReplyWithStringCallback({ value in
614-
func process(value: String) {
615-
let data = JSONUtility.fromString(value)
616-
if let data = data as? [AnyHashable?: Any?] {
617-
completion(
618-
.success(
619-
ReclaimOverrides.SessionManagement.InitResponse(
620-
sessionId: data["sessionId"] as? String ?? "",
621-
resolvedProviderVersion: data["resolvedProviderVersion"]
622-
as? String ?? ""
623-
)
614+
let data = JSONUtility.fromString(value)
615+
if let data = data as? [AnyHashable?: Any?] {
616+
completion(
617+
.success(
618+
ReclaimOverrides.SessionManagement.InitResponse(
619+
sessionId: data["sessionId"] as? String ?? "",
620+
resolvedProviderVersion: data["resolvedProviderVersion"]
621+
as? String ?? ""
624622
)
625623
)
626-
} else {
627-
print(
628-
"Error parsing session init response as Map. Type was: \(type(of: data)), data was: \(String(describing: data))"
629-
)
630-
completion(
631-
.success(
632-
ReclaimOverrides.SessionManagement.InitResponse(
633-
sessionId: "-",
634-
resolvedProviderVersion: ""
635-
)
624+
)
625+
} else {
626+
print(
627+
"Error parsing session init response as Map. Type was: \(type(of: data)), data was: \(String(describing: data))"
628+
)
629+
completion(
630+
.success(
631+
ReclaimOverrides.SessionManagement.InitResponse(
632+
sessionId: "-",
633+
resolvedProviderVersion: ""
636634
)
637635
)
638-
}
636+
)
639637
}
640638
})
641639
self._createSession(

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@reclaimprotocol/inapp-rn-sdk",
3-
"version": "0.25.0",
3+
"version": "0.25.1",
44
"description": "Reclaim Protocol's InApp React Native SDK for ZK proof generations for requests with an in-app experience of web verification",
55
"main": "./lib/module/index.js",
66
"types": "./lib/typescript/src/index.d.ts",
@@ -167,4 +167,4 @@
167167
],
168168
"version": "0.55.0"
169169
}
170-
}
170+
}

src/NativeInappRnSdk.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -198,22 +198,22 @@ export interface FeatureOptions {
198198
*/
199199
interceptorOptions?: string | null;
200200

201-
claimCreationTimeoutDurationInMins: number | null;
201+
claimCreationTimeoutDurationInMins?: number | null;
202202

203-
sessionNoActivityTimeoutDurationInMins: number | null;
203+
sessionNoActivityTimeoutDurationInMins?: number | null;
204204

205-
aiProviderNoActivityTimeoutDurationInSecs: number | null;
205+
aiProviderNoActivityTimeoutDurationInSecs?: number | null;
206206

207-
pageLoadedCompletedDebounceTimeoutMs: number | null;
207+
pageLoadedCompletedDebounceTimeoutMs?: number | null;
208208

209-
potentialLoginTimeoutS: number | null;
209+
potentialLoginTimeoutS?: number | null;
210210

211-
screenshotCaptureIntervalSeconds: number | null;
211+
screenshotCaptureIntervalSeconds?: number | null;
212212

213213
/**
214214
* Hosted TEE services Url that participate in Reclaim's TEE+MPC protocol
215215
*/
216-
teeUrls: string | null
216+
teeUrls?: string | null
217217
}
218218

219219
export interface LogConsumer {

0 commit comments

Comments
 (0)