@trustchex/react-native-sdk 1.178.0 → 1.205.0

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.
@@ -103,6 +103,9 @@ const ContractAcceptanceScreen = () => {
103
103
  if (!consent.contractIds.includes(acceptedContractId)) {
104
104
  consent.contractIds.push(acceptedContractId);
105
105
  consent.deviceInfo = await generateHumanReadableIdentifier();
106
+
107
+ // Update the context with the new device info
108
+ appContext.identificationInfo.consent = consent;
106
109
  }
107
110
  navigationManagerRef.current?.navigateToNextStep();
108
111
  },
@@ -71,6 +71,11 @@ const ResultScreen = () => {
71
71
  }
72
72
  }, []);
73
73
  const submitIdentificationConsent = useCallback(async (identificationId, sessionKey) => {
74
+ // Ensure device info is always populated before sending consent
75
+ if (!appContext.identificationInfo.consent.deviceInfo) {
76
+ console.log('Device info not set, generating now...');
77
+ appContext.identificationInfo.consent.deviceInfo = await NativeDeviceInfo.generateHumanReadableIdentifier();
78
+ }
74
79
  const {
75
80
  encryptedData,
76
81
  nonce
@@ -1 +1 @@
1
- {"version":3,"file":"ContractAcceptanceScreen.d.ts","sourceRoot":"","sources":["../../../../../src/Screens/Dynamic/ContractAcceptanceScreen.tsx"],"names":[],"mappings":"AAkBA,QAAA,MAAM,wBAAwB,+CAsH7B,CAAC;AA4BF,eAAe,wBAAwB,CAAC"}
1
+ {"version":3,"file":"ContractAcceptanceScreen.d.ts","sourceRoot":"","sources":["../../../../../src/Screens/Dynamic/ContractAcceptanceScreen.tsx"],"names":[],"mappings":"AAkBA,QAAA,MAAM,wBAAwB,+CAyH7B,CAAC;AA4BF,eAAe,wBAAwB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ResultScreen.d.ts","sourceRoot":"","sources":["../../../../../src/Screens/Static/ResultScreen.tsx"],"names":[],"mappings":"AAiCA,QAAA,MAAM,YAAY,+CAquBjB,CAAC;AAsGF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"ResultScreen.d.ts","sourceRoot":"","sources":["../../../../../src/Screens/Static/ResultScreen.tsx"],"names":[],"mappings":"AAiCA,QAAA,MAAM,YAAY,+CA4uBjB,CAAC;AAsGF,eAAe,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trustchex/react-native-sdk",
3
- "version": "1.178.0",
3
+ "version": "1.205.0",
4
4
  "description": "Trustchex mobile app react native SDK for android or ios devices",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -19,7 +19,8 @@
19
19
  },
20
20
  "repository": {
21
21
  "type": "git",
22
- "url": "git+https://github.com/trustchex/trustchex.git"
22
+ "url": "git+https://github.com/trustchex/trustchex.git",
23
+ "directory": "react-native-sdk"
23
24
  },
24
25
  "license": "SEE LICENSE IN LICENSE",
25
26
  "author": "Trustchex <support@trustchex.com> (https://trustchex.com)",
@@ -69,7 +70,6 @@
69
70
  "@eslint/compat": "^1.2.7",
70
71
  "@eslint/eslintrc": "^3.3.0",
71
72
  "@eslint/js": "^9.22.0",
72
- "@evilmartians/lefthook": "^1.5.0",
73
73
  "@react-native-community/cli": "15.0.0-alpha.2",
74
74
  "@react-native-community/image-editor": "^4.3.0",
75
75
  "@react-native/babel-preset": "0.79.5",
@@ -123,6 +123,9 @@ const ContractAcceptanceScreen = () => {
123
123
  if (!consent.contractIds.includes(acceptedContractId)) {
124
124
  consent.contractIds.push(acceptedContractId);
125
125
  consent.deviceInfo = await generateHumanReadableIdentifier();
126
+
127
+ // Update the context with the new device info
128
+ appContext.identificationInfo.consent = consent;
126
129
  }
127
130
 
128
131
  navigationManagerRef.current?.navigateToNextStep();
@@ -109,6 +109,13 @@ const ResultScreen = () => {
109
109
 
110
110
  const submitIdentificationConsent = useCallback(
111
111
  async (identificationId: string, sessionKey: string) => {
112
+ // Ensure device info is always populated before sending consent
113
+ if (!appContext.identificationInfo.consent.deviceInfo) {
114
+ console.log('Device info not set, generating now...');
115
+ appContext.identificationInfo.consent.deviceInfo =
116
+ await NativeDeviceInfo.generateHumanReadableIdentifier();
117
+ }
118
+
112
119
  const { encryptedData, nonce } = encryptWithAes(
113
120
  JSON.stringify(appContext.identificationInfo.consent),
114
121
  sessionKey