@sanctum-key/react-native-sdk 1.0.56 → 1.0.58
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/build/package.json +6 -1
- package/build/src/components/KYCElements/IDCardCapture.js +3 -3
- package/build/src/components/KYCElements/IDCardCapture.js.map +1 -1
- package/build/src/config/countriesData.d.ts.map +1 -1
- package/build/src/config/countriesData.js +249 -77
- package/build/src/config/countriesData.js.map +1 -1
- package/build/src/config/region_mapping.d.ts.map +1 -1
- package/build/src/config/region_mapping.js +45 -15
- package/build/src/config/region_mapping.js.map +1 -1
- package/build/src/utils/cameraPermissions.d.ts +7 -0
- package/build/src/utils/cameraPermissions.d.ts.map +1 -0
- package/build/src/utils/cameraPermissions.js +8 -0
- package/build/src/utils/cameraPermissions.js.map +1 -0
- package/build/src/utils/cameraPermissions.web.d.ts +7 -0
- package/build/src/utils/cameraPermissions.web.d.ts.map +1 -0
- package/build/src/utils/cameraPermissions.web.js +7 -0
- package/build/src/utils/cameraPermissions.web.js.map +1 -0
- package/build/src/utils/logger.d.ts +1 -0
- package/build/src/utils/logger.d.ts.map +1 -1
- package/build/src/utils/logger.js +37 -73
- package/build/src/utils/logger.js.map +1 -1
- package/build/src/web/WebKYCEntry.d.ts.map +1 -1
- package/build/src/web/WebKYCEntry.js +0 -2
- package/build/src/web/WebKYCEntry.js.map +1 -1
- package/package.json +6 -1
- package/src/components/KYCElements/IDCardCapture.tsx +3 -3
- package/src/config/countriesData.ts +250 -78
- package/src/config/region_mapping.ts +700 -670
- package/src/utils/cameraPermissions.ts +9 -0
- package/src/utils/cameraPermissions.web.ts +7 -0
- package/src/utils/logger.ts +42 -93
- package/src/web/WebKYCEntry.tsx +0 -2
package/build/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanctum-key/react-native-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.58",
|
|
4
4
|
"description": "Sanctum Key React Native SDK",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"types": "build/src/index.d.ts",
|
|
@@ -59,11 +59,16 @@
|
|
|
59
59
|
"zustand": "^5.0.8"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
+
"@react-native-async-storage/async-storage": "^3.1.1",
|
|
62
63
|
"@types/crypto-js": "^4.2.2",
|
|
63
64
|
"@types/react": "~19.1.0",
|
|
64
65
|
"copyfiles": "^2.4.1",
|
|
65
66
|
"expo": "~54.0.0",
|
|
67
|
+
"expo-application": "^57.0.2",
|
|
68
|
+
"expo-device": "^57.0.1",
|
|
69
|
+
"expo-localization": "^57.0.1",
|
|
66
70
|
"expo-module-scripts": "^4.1.10",
|
|
71
|
+
"posthog-react-native": "^4.68.0",
|
|
67
72
|
"react-native": "0.81.5"
|
|
68
73
|
},
|
|
69
74
|
"peerDependencies": {
|
|
@@ -17,9 +17,9 @@ import QRCode from 'react-native-qrcode-svg';
|
|
|
17
17
|
import { cropImageWithBBoxWithTolerance } from '../../utils/cropByObb';
|
|
18
18
|
import kycService, { authentification, clearAuthToken, errorMessage } from '../../modules/api/KYCService';
|
|
19
19
|
import { Linking } from 'react-native';
|
|
20
|
-
import { Camera } from 'react-native-vision-camera';
|
|
21
20
|
import { sdkLogger } from '../../utils/logger';
|
|
22
21
|
import SanctumKeySdkModule from '../../SanctumKeySdkModule';
|
|
22
|
+
import { getCameraPermissionStatus, requestCameraPermission } from '../../utils/cameraPermissions';
|
|
23
23
|
const ISO_TO_COUNTRY_NAME = {
|
|
24
24
|
'KE': 'Kenya', 'CM': 'Cameroon', 'NG': 'Nigeria', 'CA': 'Canada',
|
|
25
25
|
'FR': 'France', 'GH': 'Ghana', 'ZA': 'South Africa', 'GB': 'Britain',
|
|
@@ -302,10 +302,10 @@ export const IDCardCapture = ({ component, value = {}, onValueChange, error, lan
|
|
|
302
302
|
return;
|
|
303
303
|
}
|
|
304
304
|
try {
|
|
305
|
-
let status =
|
|
305
|
+
let status = getCameraPermissionStatus();
|
|
306
306
|
if (status !== 'granted') {
|
|
307
307
|
sdkLogger.info(`Camera permission not granted yet, requesting...`);
|
|
308
|
-
status = await
|
|
308
|
+
status = await requestCameraPermission();
|
|
309
309
|
}
|
|
310
310
|
if (status === 'granted') {
|
|
311
311
|
sdkLogger.info(`Camera permission granted. Mounting camera...`);
|