@sanctum-key/react-native-sdk 1.0.6 → 1.0.8
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 +3 -3
- package/android/build/.transforms/{f62cb96b2d1f78ca96ab35932dd530dc → c9d62bb333688ab562f51958998d5a48}/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/generated/source/buildConfig/debug/kyc/{transfergratis → SanctumKey}/com/BuildConfig.java +2 -2
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +1 -1
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +1 -1
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +2 -2
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/kyc/SanctumKey/com/BuildConfig.class +0 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +1 -1
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +1 -1
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -1
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +1 -1
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/SanctumKey/com/SanctumKeySdkModule$definition$1$5$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/SanctumKey/com/SanctumKeySdkModule$definition$1$5$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$1.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$1.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$2.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$2.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$3.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$3.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$4.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$4.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$5.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$5.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$6.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$6.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$View$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$1.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$lambda$4$$inlined$Prop$1.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$2.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$lambda$4$$inlined$Prop$2.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule.class → SanctumKey/com/SanctumKeySdkModule.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkView.class → SanctumKey/com/SanctumKeySdkView.class} +0 -0
- package/android/build.gradle +2 -2
- package/android/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/kyc/transfergratis/com/TransfergratisSdkModule.kt +6 -6
- package/android/src/main/java/kyc/transfergratis/com/TransfergratisSdkView.kt +2 -2
- package/build/package.json +9 -7
- package/build/src/App.d.ts +2 -2
- package/build/src/App.d.ts.map +1 -1
- package/build/src/App.js +2 -2
- package/build/src/App.js.map +1 -1
- package/build/src/{TransfergratisSdk.types.d.ts → SanctumKeySdk.types.d.ts} +3 -3
- package/build/src/SanctumKeySdk.types.d.ts.map +1 -0
- package/build/src/SanctumKeySdk.types.js +2 -0
- package/build/src/SanctumKeySdk.types.js.map +1 -0
- package/build/src/{TransfergratisSdkModule.d.ts → SanctumKeySdkModule.d.ts} +4 -4
- package/build/src/SanctumKeySdkModule.d.ts.map +1 -0
- package/build/src/{TransfergratisSdkModule.js → SanctumKeySdkModule.js} +2 -2
- package/build/src/SanctumKeySdkModule.js.map +1 -0
- package/build/src/{TransfergratisSdkModule.web.d.ts → SanctumKeySdkModule.web.d.ts} +4 -4
- package/build/src/SanctumKeySdkModule.web.d.ts.map +1 -0
- package/build/src/{TransfergratisSdkModule.web.js → SanctumKeySdkModule.web.js} +3 -3
- package/build/src/SanctumKeySdkModule.web.js.map +1 -0
- package/build/src/SanctumKeySdkView.d.ts +4 -0
- package/build/src/SanctumKeySdkView.d.ts.map +1 -0
- package/build/src/SanctumKeySdkView.js +7 -0
- package/build/src/SanctumKeySdkView.js.map +1 -0
- package/build/src/SanctumKeySdkView.web.d.ts +4 -0
- package/build/src/SanctumKeySdkView.web.d.ts.map +1 -0
- package/build/src/{TransfergratisSdkView.web.js → SanctumKeySdkView.web.js} +2 -2
- package/build/src/SanctumKeySdkView.web.js.map +1 -0
- package/build/src/api/axios.js +2 -2
- package/build/src/api/axios.js.map +1 -1
- package/build/src/components/EnhancedCameraView.d.ts.map +1 -1
- package/build/src/components/EnhancedCameraView.js +107 -330
- package/build/src/components/EnhancedCameraView.js.map +1 -1
- package/build/src/components/KYCElements/EmailVerificationTemplate.d.ts.map +1 -1
- package/build/src/components/KYCElements/EmailVerificationTemplate.js +114 -15
- package/build/src/components/KYCElements/EmailVerificationTemplate.js.map +1 -1
- package/build/src/components/KYCElements/IDCardCapture.d.ts.map +1 -1
- package/build/src/components/KYCElements/IDCardCapture.js +166 -695
- package/build/src/components/KYCElements/IDCardCapture.js.map +1 -1
- package/build/src/components/KYCElements/PhoneVerificationTemplate.d.ts.map +1 -1
- package/build/src/components/KYCElements/PhoneVerificationTemplate.js +282 -40
- package/build/src/components/KYCElements/PhoneVerificationTemplate.js.map +1 -1
- package/build/src/components/KYCElements/SelfieCapture.d.ts +1 -1
- package/build/src/components/KYCElements/SelfieCapture.d.ts.map +1 -1
- package/build/src/components/KYCElements/SelfieCapture.js +130 -192
- package/build/src/components/KYCElements/SelfieCapture.js.map +1 -1
- package/build/src/components/KYCElements/SelfieCaptureTemplate.d.ts.map +1 -1
- package/build/src/components/KYCElements/SelfieCaptureTemplate.js +131 -433
- package/build/src/components/KYCElements/SelfieCaptureTemplate.js.map +1 -1
- package/build/src/components/NativeCameraView.js +1 -1
- package/build/src/components/NativeCameraView.js.map +1 -1
- package/build/src/components/OverLay/IdCard.d.ts +3 -2
- package/build/src/components/OverLay/IdCard.d.ts.map +1 -1
- package/build/src/components/OverLay/IdCard.js +149 -141
- package/build/src/components/OverLay/IdCard.js.map +1 -1
- package/build/src/components/OverLay/SelfieOverlay.d.ts +2 -1
- package/build/src/components/OverLay/SelfieOverlay.d.ts.map +1 -1
- package/build/src/components/OverLay/SelfieOverlay.js +37 -95
- package/build/src/components/OverLay/SelfieOverlay.js.map +1 -1
- package/build/src/components/OverLay/type.d.ts +1 -0
- package/build/src/components/OverLay/type.d.ts.map +1 -1
- package/build/src/components/OverLay/type.js.map +1 -1
- package/build/src/components/Svgs/scanningLine.d.ts +2 -1
- package/build/src/components/Svgs/scanningLine.d.ts.map +1 -1
- package/build/src/components/Svgs/scanningLine.js +55 -51
- package/build/src/components/Svgs/scanningLine.js.map +1 -1
- package/build/src/config/KYCConfig.js +1 -1
- package/build/src/config/KYCConfig.js.map +1 -1
- package/build/src/config/allowedDomains.js +6 -6
- package/build/src/config/allowedDomains.js.map +1 -1
- package/build/src/hooks/useTemplateKYCFlow.d.ts.map +1 -1
- package/build/src/hooks/useTemplateKYCFlow.js +37 -38
- package/build/src/hooks/useTemplateKYCFlow.js.map +1 -1
- package/build/src/index.d.ts +3 -3
- package/build/src/index.d.ts.map +1 -1
- package/build/src/index.js +3 -3
- package/build/src/index.js.map +1 -1
- package/build/src/modules/api/CardAuthentification.d.ts +0 -5
- package/build/src/modules/api/CardAuthentification.d.ts.map +1 -1
- package/build/src/modules/api/CardAuthentification.js +114 -116
- package/build/src/modules/api/CardAuthentification.js.map +1 -1
- package/build/src/modules/api/KYCService.d.ts +12 -1
- package/build/src/modules/api/KYCService.d.ts.map +1 -1
- package/build/src/modules/api/KYCService.js +102 -38
- package/build/src/modules/api/KYCService.js.map +1 -1
- package/build/src/modules/camera/NativeCameraModule.js +17 -17
- package/build/src/modules/camera/NativeCameraModule.js.map +1 -1
- package/expo-module.config.json +2 -2
- package/ios/TransfergratisSdk.podspec +2 -2
- package/ios/TransfergratisSdkModule.swift +12 -12
- package/package.json +9 -7
- package/src/App.tsx +2 -2
- package/src/{TransfergratisSdk.types.ts → SanctumKeySdk.types.ts} +2 -2
- package/src/{TransfergratisSdkModule.ts → SanctumKeySdkModule.ts} +3 -3
- package/src/{TransfergratisSdkModule.web.ts → SanctumKeySdkModule.web.ts} +3 -3
- package/src/SanctumKeySdkView.tsx +11 -0
- package/src/{TransfergratisSdkView.web.tsx → SanctumKeySdkView.web.tsx} +2 -2
- package/src/api/axios.ts +2 -2
- package/src/components/EnhancedCameraView.tsx +131 -385
- package/src/components/KYCElements/EmailVerificationTemplate.tsx +141 -26
- package/src/components/KYCElements/IDCardCapture.tsx +228 -868
- package/src/components/KYCElements/PhoneVerificationTemplate.tsx +342 -60
- package/src/components/KYCElements/SelfieCapture.tsx +184 -213
- package/src/components/KYCElements/SelfieCaptureTemplate.tsx +330 -662
- package/src/components/NativeCameraView.tsx +1 -1
- package/src/components/OverLay/IdCard.tsx +218 -217
- package/src/components/OverLay/SelfieOverlay.tsx +56 -134
- package/src/components/OverLay/type.ts +1 -0
- package/src/components/Svgs/scanningLine.tsx +71 -72
- package/src/config/KYCConfig.ts +1 -1
- package/src/config/allowedDomains.ts +6 -6
- package/src/hooks/useTemplateKYCFlow.tsx +45 -39
- package/src/i18n/README.md +1 -1
- package/src/index.ts +3 -3
- package/src/modules/api/CardAuthentification.ts +202 -200
- package/src/modules/api/KYCService.ts +169 -53
- package/src/modules/camera/NativeCameraModule.ts +17 -17
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$View$1.class +0 -0
- package/build/src/TransfergratisSdk.types.d.ts.map +0 -1
- package/build/src/TransfergratisSdk.types.js +0 -2
- package/build/src/TransfergratisSdk.types.js.map +0 -1
- package/build/src/TransfergratisSdkModule.d.ts.map +0 -1
- package/build/src/TransfergratisSdkModule.js.map +0 -1
- package/build/src/TransfergratisSdkModule.web.d.ts.map +0 -1
- package/build/src/TransfergratisSdkModule.web.js.map +0 -1
- package/build/src/TransfergratisSdkView.d.ts +0 -4
- package/build/src/TransfergratisSdkView.d.ts.map +0 -1
- package/build/src/TransfergratisSdkView.js +0 -7
- package/build/src/TransfergratisSdkView.js.map +0 -1
- package/build/src/TransfergratisSdkView.web.d.ts +0 -4
- package/build/src/TransfergratisSdkView.web.d.ts.map +0 -1
- package/build/src/TransfergratisSdkView.web.js.map +0 -1
- package/src/TransfergratisSdkView.tsx +0 -11
- /package/android/build/.transforms/{532c0e65d82f446633d0a7dab2772198 → ab90740579f5bd05b27b4343ada2d1c9}/results.bin +0 -0
- /package/android/build/.transforms/{532c0e65d82f446633d0a7dab2772198 → ab90740579f5bd05b27b4343ada2d1c9}/transformed/classes/classes_dex/classes.dex +0 -0
- /package/android/build/.transforms/{f62cb96b2d1f78ca96ab35932dd530dc → c9d62bb333688ab562f51958998d5a48}/results.bin +0 -0
- /package/android/build/{intermediates/javac/debug/compileDebugJavaWithJavac/classes/kyc/transfergratis/com/BuildConfig.class → tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/BuildConfig.class.uniqueId0} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Dimensions, StyleSheet, Text, View, Image } from "react-native";
|
|
2
3
|
import { IdCardOverlayProps } from "./type";
|
|
3
4
|
import Svg, { Rect, Path, Mask, Defs } from 'react-native-svg';
|
|
4
5
|
import ScanningLine from "../Svgs/scanningLine";
|
|
@@ -10,80 +11,50 @@ const SelfieOverlay = ({ xMin, yMin, xMax, yMax, cornerOpacity, instructions, co
|
|
|
10
11
|
const screenWidth = Dimensions.get('window').width;
|
|
11
12
|
const screenHeight = Dimensions.get('window').height;
|
|
12
13
|
|
|
13
|
-
// Dimensions de l'icône FrontSelfieIcon (240x285 selon le viewBox)
|
|
14
14
|
const iconWidth = 240;
|
|
15
15
|
const iconHeight = 285;
|
|
16
16
|
|
|
17
|
-
// Calculer la position pour centrer l'icône
|
|
18
17
|
const iconX = (screenWidth - iconWidth) / 2;
|
|
19
18
|
const iconY = (screenHeight - iconHeight) / 3;
|
|
20
19
|
|
|
21
|
-
// Position du centre pour le masque (doit correspondre au centre de l'icône)
|
|
22
20
|
const maskCenterX = iconX + iconWidth / 2;
|
|
23
21
|
const maskCenterY = iconY + iconHeight / 2;
|
|
24
22
|
|
|
25
|
-
// Zone pour ScanningLine (basée sur la zone de l'icône)
|
|
26
23
|
const scanningYMin = iconY;
|
|
27
24
|
const scanningYMax = iconY + iconHeight;
|
|
28
25
|
|
|
29
26
|
return (
|
|
30
|
-
<View style={StyleSheet.absoluteFill}>
|
|
27
|
+
<View style={StyleSheet.absoluteFill} pointerEvents="none">
|
|
31
28
|
{stepperProps ? (
|
|
32
29
|
<StepOverlay {...stepperProps} />
|
|
33
30
|
) : null}
|
|
34
31
|
|
|
35
|
-
<Svg
|
|
36
|
-
height="100%"
|
|
37
|
-
width="100%"
|
|
38
|
-
style={[StyleSheet.absoluteFill]}
|
|
39
|
-
>
|
|
32
|
+
<Svg height="100%" width="100%" style={[StyleSheet.absoluteFill]}>
|
|
40
33
|
<Defs>
|
|
41
34
|
<Mask id="faceMask">
|
|
42
|
-
|
|
43
|
-
<Rect
|
|
44
|
-
x="0"
|
|
45
|
-
y="0"
|
|
46
|
-
width="100%"
|
|
47
|
-
height="100%"
|
|
48
|
-
fill="white"
|
|
49
|
-
/>
|
|
50
|
-
{/* Zone noire - zone masquée (forme du visage) - exactement alignée avec l'icône */}
|
|
35
|
+
<Rect x="0" y="0" width="100%" height="100%" fill="white" />
|
|
51
36
|
<Path
|
|
52
|
-
d="M35.4198 48.9242C38.2153 41.9014 42.5851
|
|
37
|
+
d="M35.4198 48.9242C38.2153 41.9014 42.5851 30.8232 48.3859 30.8232C61.3601 19.9842 88.1543 1.5 120 1.5C151.846 1.5 178.64 19.9842 191.614 30.8232C197.415 35.6693 201.785 41.9014 204.58 48.9242C210.484 63.7564 220 93.0114 220 127.5C220 168.082 204.19 212.617 198.234 227.954C196.792 231.667 194.971 235.196 192.628 238.417C183.46 251.021 156.313 283.5 120 283.5C83.6867 283.5 56.5401 251.021 47.3723 238.417C45.0294 235.196 43.2081 231.667 41.7663 227.954C35.8102 212.617 20 168.082 20 127.5C20 93.0114 29.5157 63.7564 35.4198 48.9242Z"
|
|
53
38
|
fill="black"
|
|
54
39
|
transform={`translate(${maskCenterX}, ${maskCenterY}) translate(-120, -142.5)`}
|
|
55
40
|
/>
|
|
56
41
|
</Mask>
|
|
57
42
|
</Defs>
|
|
58
43
|
|
|
59
|
-
|
|
60
|
-
<Rect
|
|
61
|
-
x="0"
|
|
62
|
-
y="0"
|
|
63
|
-
width="100%"
|
|
64
|
-
height="100%"
|
|
65
|
-
fill="rgba(0, 0, 0, 0.5)"
|
|
66
|
-
mask="url(#faceMask)"
|
|
67
|
-
/>
|
|
44
|
+
<Rect x="0" y="0" width="100%" height="100%" fill="rgba(0, 0, 0, 0.65)" mask="url(#faceMask)" />
|
|
68
45
|
{isSuccess ? null : <ScanningLine yMin={scanningYMin} screenWidth={screenWidth} height={screenHeight} yMax={scanningYMax} />}
|
|
69
46
|
</Svg>
|
|
70
47
|
|
|
71
|
-
{
|
|
72
|
-
<View style={[styles.iconContainer, {
|
|
73
|
-
left: iconX,
|
|
74
|
-
top: iconY,
|
|
75
|
-
width: iconWidth,
|
|
76
|
-
height: iconHeight,
|
|
77
|
-
}]}>
|
|
48
|
+
<View style={[styles.iconContainer, { left: iconX, top: iconY, width: iconWidth, height: iconHeight }]}>
|
|
78
49
|
{orientation === "center" ? <FrontSelfieIcon /> : <SideSelfieIcon />}
|
|
79
50
|
</View>
|
|
80
51
|
|
|
81
|
-
{/*
|
|
82
|
-
{orientation !== "center" ? (
|
|
52
|
+
{/* 🚨 REVERTED TO USE YOUR GIF FILE */}
|
|
53
|
+
{orientation && orientation !== "center" ? (
|
|
83
54
|
<View style={[
|
|
84
55
|
styles.arrowContainer,
|
|
85
56
|
{
|
|
86
|
-
top: iconY + iconHeight / 2 - 50,
|
|
57
|
+
top: iconY + iconHeight / 2 - 50,
|
|
87
58
|
left: orientation === "left" ? iconX - 72 : 'auto',
|
|
88
59
|
right: orientation === "right" ? iconX - 75 : 'auto'
|
|
89
60
|
}
|
|
@@ -93,119 +64,70 @@ const SelfieOverlay = ({ xMin, yMin, xMax, yMax, cornerOpacity, instructions, co
|
|
|
93
64
|
resizeMode="contain"
|
|
94
65
|
style={[
|
|
95
66
|
styles.arrowImage,
|
|
67
|
+
// If the orientation is right, we flip the image horizontally
|
|
96
68
|
{ transform: orientation === "right" ? [{ scaleX: -1 }] : [] }
|
|
97
69
|
]}
|
|
98
70
|
/>
|
|
99
71
|
</View>
|
|
100
72
|
) : null}
|
|
101
73
|
|
|
102
|
-
|
|
74
|
+
{/* UPGRADED INSTRUCTIONS UI */}
|
|
103
75
|
<View style={styles.bottomIntruction}>
|
|
104
|
-
<Text style={styles.bottomTitle}>
|
|
105
|
-
|
|
106
|
-
</Text>
|
|
107
|
-
<Text style={styles.bottomSubtitle}>
|
|
108
|
-
{instructionsSubtitle}
|
|
109
|
-
</Text>
|
|
76
|
+
<Text style={styles.bottomTitle}>{instructionsTile}</Text>
|
|
77
|
+
<Text style={styles.bottomSubtitle}>{instructionsSubtitle}</Text>
|
|
110
78
|
</View>
|
|
111
79
|
</View>
|
|
112
|
-
)
|
|
113
|
-
}
|
|
80
|
+
);
|
|
81
|
+
};
|
|
114
82
|
|
|
115
83
|
export default SelfieOverlay;
|
|
116
84
|
|
|
117
|
-
|
|
118
85
|
const styles = StyleSheet.create({
|
|
119
|
-
|
|
120
|
-
position: 'absolute',
|
|
121
|
-
|
|
122
|
-
left: 0,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
},
|
|
127
|
-
svg: {
|
|
128
|
-
position: 'absolute',
|
|
129
|
-
top: 0,
|
|
130
|
-
left: 0,
|
|
131
|
-
width: '100%',
|
|
132
|
-
height: '100%',
|
|
133
|
-
},
|
|
134
|
-
topIntruction: {
|
|
135
|
-
zIndex: 1000,
|
|
136
|
-
flexDirection: 'row',
|
|
86
|
+
bottomIntruction: {
|
|
87
|
+
position: 'absolute',
|
|
88
|
+
bottom: 50,
|
|
89
|
+
left: 0,
|
|
90
|
+
right: 0,
|
|
91
|
+
width: '100%',
|
|
92
|
+
paddingHorizontal: 24,
|
|
137
93
|
alignItems: 'center',
|
|
138
|
-
justifyContent: 'center',
|
|
139
|
-
paddingVertical: 20,
|
|
140
|
-
paddingHorizontal: 10,
|
|
141
|
-
marginHorizontal: 20,
|
|
142
|
-
marginTop: 10,
|
|
143
|
-
backgroundColor: "#FDE04730",
|
|
144
|
-
borderColor: "#FDE047",
|
|
145
|
-
borderWidth: 1,
|
|
146
|
-
borderRadius: 10,
|
|
147
|
-
gap: 10,
|
|
148
94
|
},
|
|
149
|
-
|
|
150
|
-
color: '#
|
|
151
|
-
fontSize:
|
|
152
|
-
fontWeight: 'bold',
|
|
95
|
+
bottomTitle: {
|
|
96
|
+
color: '#FFFFFF',
|
|
97
|
+
fontSize: 24,
|
|
98
|
+
fontWeight: 'bold',
|
|
153
99
|
textAlign: 'center',
|
|
100
|
+
textShadowColor: 'rgba(0, 0, 0, 0.8)',
|
|
101
|
+
textShadowOffset: { width: 0, height: 2 },
|
|
102
|
+
textShadowRadius: 4,
|
|
154
103
|
},
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
104
|
+
bottomSubtitle: {
|
|
105
|
+
color: '#FFFFFF',
|
|
106
|
+
marginTop: 12,
|
|
107
|
+
fontSize: 15,
|
|
108
|
+
fontWeight: '600',
|
|
109
|
+
textAlign: 'center',
|
|
110
|
+
lineHeight: 22,
|
|
111
|
+
backgroundColor: 'rgba(0,0,0,0.6)',
|
|
112
|
+
paddingVertical: 10,
|
|
161
113
|
paddingHorizontal: 20,
|
|
114
|
+
borderRadius: 20,
|
|
115
|
+
overflow: 'hidden',
|
|
162
116
|
},
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
textAlign: 'center',
|
|
117
|
+
iconContainer: {
|
|
118
|
+
position: 'absolute',
|
|
119
|
+
justifyContent: 'center',
|
|
120
|
+
alignItems: 'center'
|
|
168
121
|
},
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
bottomTitle: {
|
|
176
|
-
color: 'white',
|
|
177
|
-
fontSize: 25,
|
|
178
|
-
fontWeight: 'bold',
|
|
179
|
-
textAlign: 'center',
|
|
180
|
-
},
|
|
181
|
-
bottomSubtitle: {
|
|
182
|
-
color: 'white',
|
|
183
|
-
marginTop: 15,
|
|
184
|
-
fontSize: 14,
|
|
185
|
-
fontWeight: '500',
|
|
186
|
-
textAlign: 'center',
|
|
187
|
-
},
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
image: {
|
|
191
|
-
position: 'absolute',
|
|
192
|
-
borderRadius: 10,
|
|
193
|
-
},
|
|
194
|
-
iconContainer: {
|
|
195
|
-
position: 'absolute',
|
|
196
|
-
justifyContent: 'center',
|
|
197
|
-
alignItems: 'center',
|
|
198
|
-
},
|
|
199
|
-
arrowContainer: {
|
|
200
|
-
position: 'absolute',
|
|
201
|
-
width: 100,
|
|
202
|
-
height: 100,
|
|
203
|
-
justifyContent: 'center',
|
|
204
|
-
alignItems: 'center',
|
|
122
|
+
arrowContainer: {
|
|
123
|
+
position: 'absolute',
|
|
124
|
+
width: 100,
|
|
125
|
+
height: 100,
|
|
126
|
+
justifyContent: 'center',
|
|
127
|
+
alignItems: 'center'
|
|
205
128
|
},
|
|
206
129
|
arrowImage: {
|
|
207
|
-
width:
|
|
208
|
-
height:
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
})
|
|
130
|
+
width: 80,
|
|
131
|
+
height: 80,
|
|
132
|
+
}
|
|
133
|
+
});
|
|
@@ -1,88 +1,87 @@
|
|
|
1
|
-
import { useEffect,
|
|
2
|
-
import { StyleSheet } from
|
|
3
|
-
import Svg, {
|
|
1
|
+
import React, { useEffect, useRef } from 'react';
|
|
2
|
+
import { Animated, Easing, StyleSheet } from 'react-native';
|
|
3
|
+
import Svg, { LinearGradient, Rect, Stop, Defs } from 'react-native-svg';
|
|
4
4
|
|
|
5
5
|
interface ScanningLineProps {
|
|
6
|
-
yMin: number
|
|
7
|
-
yMax: number
|
|
8
|
-
screenWidth: number
|
|
9
|
-
height: number
|
|
6
|
+
yMin: number;
|
|
7
|
+
yMax: number;
|
|
8
|
+
screenWidth: number;
|
|
9
|
+
height: number;
|
|
10
10
|
}
|
|
11
|
-
const ScanningLine = ({ yMin, screenWidth, height, yMax }: ScanningLineProps) => {
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
direction: 'up' | 'down'
|
|
16
|
-
}>({
|
|
17
|
-
val: yMin - (40 + 280),
|
|
18
|
-
direction: 'down'
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
const interval = setInterval(() => {
|
|
23
|
-
setScanLineX(prev => {
|
|
24
|
-
|
|
25
|
-
const newX = prev.val + (prev.direction === 'up' ? -1 : 1) * Math.round(Math.random() * 2); // Vitesse de déplacement horizontal
|
|
26
|
-
if (prev.direction === "down") {
|
|
27
|
-
if (newX > yMax - (280 - 40)) {
|
|
28
|
-
return { val: yMax + (40), direction: 'up' }
|
|
29
|
-
} else {
|
|
30
|
-
return { val: newX, direction: 'down' }
|
|
31
|
-
}
|
|
32
|
-
} else {
|
|
33
|
-
if (newX < yMin - (40)) {
|
|
34
|
-
return { val: yMin - (40 + 280), direction: 'down' }
|
|
35
|
-
} else {
|
|
36
|
-
return { val: newX, direction: 'up' }
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
});
|
|
41
|
-
}, 2);
|
|
12
|
+
const ScanningLine = ({ yMin, yMax, screenWidth, height }: ScanningLineProps): React.ReactElement => {
|
|
13
|
+
const animatedValue = useRef(new Animated.Value(0)).current;
|
|
42
14
|
|
|
43
|
-
|
|
44
|
-
}, []);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return <Svg width={screenWidth} height={height} style={styles.svg}>
|
|
49
|
-
<Defs>
|
|
50
|
-
<LinearGradient id="grad-rect" x1="0%"
|
|
51
|
-
y1={scanLineX.direction === 'up' ? "100%" : "0%"} x2="0%"
|
|
52
|
-
y2={scanLineX.direction === 'up' ? "0%" : "100%"}>
|
|
53
|
-
<Stop offset="30%" stopColor="#2DBD60" stopOpacity="0" />
|
|
54
|
-
<Stop offset="40%" stopColor="#2DBD60" stopOpacity="0" />
|
|
55
|
-
<Stop offset="50%" stopColor="#2DBD60" stopOpacity="0" />
|
|
56
|
-
<Stop offset="60%" stopColor="#2DBD60" stopOpacity="0" />
|
|
57
|
-
<Stop offset="70%" stopColor="#2DBD60" stopOpacity="0.02" />
|
|
58
|
-
<Stop offset="88%" stopColor="#2DBD60" stopOpacity="0.09" />
|
|
59
|
-
<Stop offset="90%" stopColor="#2DBD60" stopOpacity="0.42" />
|
|
60
|
-
<Stop offset="100%" stopColor="#2DBD60" stopOpacity="1" />
|
|
61
|
-
</LinearGradient>
|
|
62
|
-
</Defs>
|
|
15
|
+
const boxHeight = yMax - yMin;
|
|
63
16
|
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
const startAnimation = () => {
|
|
19
|
+
animatedValue.setValue(0);
|
|
20
|
+
Animated.loop(
|
|
21
|
+
Animated.timing(animatedValue, {
|
|
22
|
+
toValue: 1,
|
|
23
|
+
duration: 2500,
|
|
24
|
+
easing: Easing.linear,
|
|
25
|
+
useNativeDriver: true,
|
|
26
|
+
})
|
|
27
|
+
).start();
|
|
28
|
+
};
|
|
64
29
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
fill="url(#grad-rect)"
|
|
30
|
+
startAnimation();
|
|
31
|
+
|
|
32
|
+
return () => {
|
|
33
|
+
animatedValue.stopAnimation();
|
|
34
|
+
};
|
|
35
|
+
}, [animatedValue, boxHeight]);
|
|
72
36
|
|
|
73
|
-
|
|
74
|
-
|
|
37
|
+
const translateY = animatedValue.interpolate({
|
|
38
|
+
inputRange: [0, 0.5, 1],
|
|
39
|
+
outputRange: [yMin, yMax, yMin],
|
|
40
|
+
});
|
|
75
41
|
|
|
76
|
-
|
|
42
|
+
return (
|
|
43
|
+
<Animated.View
|
|
44
|
+
style={[
|
|
45
|
+
styles.container,
|
|
46
|
+
{
|
|
47
|
+
width: screenWidth,
|
|
48
|
+
height: height,
|
|
49
|
+
transform: [{ translateY }],
|
|
50
|
+
},
|
|
51
|
+
]}
|
|
52
|
+
pointerEvents="none"
|
|
53
|
+
>
|
|
54
|
+
<Svg height="4" width={screenWidth}>
|
|
55
|
+
<Defs>
|
|
56
|
+
<LinearGradient id="grad" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
57
|
+
<Stop offset="0%" stopColor="transparent" stopOpacity="0" />
|
|
58
|
+
<Stop offset="50%" stopColor="#22C55E" stopOpacity="1" />
|
|
59
|
+
<Stop offset="100%" stopColor="transparent" stopOpacity="0" />
|
|
60
|
+
</LinearGradient>
|
|
61
|
+
</Defs>
|
|
62
|
+
<Rect x="0" y="0" width={screenWidth} height="4" fill="url(#grad)" />
|
|
63
|
+
</Svg>
|
|
64
|
+
|
|
65
|
+
<Svg height="40" width={screenWidth} style={{ marginTop: -2 }}>
|
|
66
|
+
<Defs>
|
|
67
|
+
<LinearGradient id="glow" x1="0%" y1="0%" x2="0%" y2="100%">
|
|
68
|
+
<Stop offset="0%" stopColor="#22C55E" stopOpacity="0.4" />
|
|
69
|
+
<Stop offset="100%" stopColor="#22C55E" stopOpacity="0" />
|
|
70
|
+
</LinearGradient>
|
|
71
|
+
</Defs>
|
|
72
|
+
<Rect x="0" y="0" width={screenWidth} height="40" fill="url(#glow)" />
|
|
73
|
+
</Svg>
|
|
74
|
+
</Animated.View>
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
77
|
|
|
78
78
|
const styles = StyleSheet.create({
|
|
79
|
-
|
|
79
|
+
container: {
|
|
80
80
|
position: 'absolute',
|
|
81
81
|
top: 0,
|
|
82
82
|
left: 0,
|
|
83
|
-
|
|
84
|
-
height: '100%',
|
|
83
|
+
zIndex: 10,
|
|
85
84
|
},
|
|
86
|
-
})
|
|
85
|
+
});
|
|
87
86
|
|
|
88
|
-
export default ScanningLine
|
|
87
|
+
export default ScanningLine;
|
package/src/config/KYCConfig.ts
CHANGED
|
@@ -6,7 +6,7 @@ class KYCConfig {
|
|
|
6
6
|
|
|
7
7
|
private backendUrls: Record<BackendEnvironment, string> = {
|
|
8
8
|
PRODUCTION: 'https://service.sanctumkey.com/api/v1',
|
|
9
|
-
TEST: 'https://kyc-backend.
|
|
9
|
+
TEST: 'https://kyc-backend.SanctumKey.net/api/v1',
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
private constructor() { }
|
|
@@ -12,11 +12,11 @@ export interface AllowedDomainConfig {
|
|
|
12
12
|
// Default configuration - can be overridden via environment variables
|
|
13
13
|
const DEFAULT_CONFIG: AllowedDomainConfig = {
|
|
14
14
|
domains: [
|
|
15
|
-
'
|
|
16
|
-
'www.
|
|
17
|
-
'admin.
|
|
18
|
-
'dashboard.
|
|
19
|
-
'preweb.
|
|
15
|
+
'SanctumKey.com',
|
|
16
|
+
'www.SanctumKey.com',
|
|
17
|
+
'admin.SanctumKey.com',
|
|
18
|
+
'dashboard.SanctumKey.com',
|
|
19
|
+
'preweb.SanctumKey.net',
|
|
20
20
|
// Add other trusted domains here
|
|
21
21
|
],
|
|
22
22
|
enforceHttps: true,
|
|
@@ -59,7 +59,7 @@ export const isDomainAllowed = (domain: string): boolean => {
|
|
|
59
59
|
return true;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
// Subdomain match (e.g., app.
|
|
62
|
+
// Subdomain match (e.g., app.SanctumKey.com matches SanctumKey.com)
|
|
63
63
|
if (domain.endsWith('.' + allowedDomain)) {
|
|
64
64
|
return true;
|
|
65
65
|
}
|
|
@@ -671,71 +671,77 @@ export const useTemplateKYCFlow = (
|
|
|
671
671
|
logger.log('Initializing session');
|
|
672
672
|
|
|
673
673
|
const token = apiKey ? undefined : await authentification();
|
|
674
|
-
console.log('token in initializeSession', { token, apiKey }
|
|
674
|
+
console.log('token in initializeSession', { token, apiKey });
|
|
675
675
|
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
676
|
+
if (!token && !apiKey) {
|
|
677
|
+
throw new Error("Cannot proceed: Authentication token and API key are both missing.");
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
let resolvedSessionId = state.session.session_id;
|
|
679
681
|
|
|
680
|
-
if (
|
|
681
|
-
logger.log('Resuming existing session:',
|
|
682
|
-
// Verify existence/validity if needed, for now trust the ID and just fetch/use it
|
|
683
|
-
session = { session_id: existingSessionId };
|
|
682
|
+
if (resolvedSessionId && resolvedSessionId.length > 0) {
|
|
683
|
+
logger.log('Resuming existing session:', resolvedSessionId);
|
|
684
684
|
} else {
|
|
685
|
-
|
|
685
|
+
const newSessionRes = await kycService.newSession({ token, apiKey });
|
|
686
|
+
resolvedSessionId = newSessionRes?.session_id;
|
|
687
|
+
|
|
688
|
+
if (!resolvedSessionId) {
|
|
689
|
+
throw new Error("Backend response did not contain a valid session_id.");
|
|
690
|
+
}
|
|
686
691
|
}
|
|
687
692
|
|
|
688
|
-
|
|
689
|
-
// This makes save_session webhook calls more reliable on all runtimes.
|
|
690
|
-
if (onSessionSave && !hasSavedSessionRef.current && session?.session_id) {
|
|
693
|
+
if (onSessionSave && !hasSavedSessionRef.current && resolvedSessionId) {
|
|
691
694
|
hasSavedSessionRef.current = true;
|
|
692
|
-
onSessionSave(
|
|
695
|
+
onSessionSave(resolvedSessionId);
|
|
693
696
|
}
|
|
694
697
|
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
},
|
|
698
|
+
const templateId = chooseTemplateId(templateWithReviewAndVerification);
|
|
699
|
+
|
|
700
|
+
// This is the API call that we know succeeds
|
|
701
|
+
await kycService.verificationSession({
|
|
702
|
+
session_id: resolvedSessionId,
|
|
703
|
+
step: 0,
|
|
704
|
+
data: {
|
|
705
|
+
template_id: templateId,
|
|
706
|
+
metadata: {
|
|
707
|
+
language: initialLanguage,
|
|
708
|
+
...(referenceId ? { reference_id: referenceId } : {}),
|
|
707
709
|
},
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
// Non-fatal: we will surface errors via state below if needed
|
|
716
|
-
}
|
|
710
|
+
},
|
|
711
|
+
templateId: templateId,
|
|
712
|
+
token: token ?? "",
|
|
713
|
+
action: 'initialize_session',
|
|
714
|
+
apiKey: apiKey,
|
|
715
|
+
});
|
|
716
|
+
|
|
717
717
|
|
|
718
718
|
setState(prev => ({
|
|
719
719
|
...prev,
|
|
720
720
|
session: {
|
|
721
721
|
...prev.session,
|
|
722
|
-
session_id:
|
|
723
|
-
token: token,
|
|
722
|
+
session_id: resolvedSessionId,
|
|
723
|
+
token: token ?? "",
|
|
724
724
|
isInitialized: true,
|
|
725
725
|
isProcessing: false,
|
|
726
726
|
error: null,
|
|
727
727
|
}
|
|
728
728
|
}));
|
|
729
|
-
} catch (error) {
|
|
730
729
|
|
|
731
|
-
|
|
730
|
+
} catch (error: any) {
|
|
731
|
+
// ✅ FIX: Extract the actual message so it doesn't log as {}
|
|
732
|
+
const errorMessage = error?.response?.data?.message
|
|
733
|
+
|| error?.message
|
|
734
|
+
|| "Erreur lors de l'initialisation de la session";
|
|
735
|
+
|
|
736
|
+
logger.error('Error initializing sessionnnn:', errorMessage);
|
|
737
|
+
|
|
732
738
|
setState(prev => ({
|
|
733
739
|
...prev,
|
|
734
740
|
session: {
|
|
735
741
|
...prev.session,
|
|
736
742
|
isInitialized: false,
|
|
737
743
|
isProcessing: false,
|
|
738
|
-
error:
|
|
744
|
+
error: errorMessage,
|
|
739
745
|
},
|
|
740
746
|
}));
|
|
741
747
|
}
|
package/src/i18n/README.md
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './SanctumKeySdk.types';
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
// Export KYC types
|
|
@@ -8,9 +8,9 @@ export * from './types/KYC.types';
|
|
|
8
8
|
export * from './types/env.types';
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
export { TemplateKYCExample as
|
|
11
|
+
export { TemplateKYCExample as LaunchSanctumKeyKYC } from './components/TemplateKYCExample';
|
|
12
12
|
// Backward compatibility for existing integrations using the typo.
|
|
13
|
-
export { TemplateKYCExample as
|
|
13
|
+
export { TemplateKYCExample as LauchSanctumKeyKYC } from './components/TemplateKYCExample';
|
|
14
14
|
|
|
15
15
|
// Export Template Flow Components
|
|
16
16
|
export { TemplateKYCFlow } from './components/TemplateKYCFlowRefactored';
|