@trustchex/react-native-sdk 1.513.3 → 1.514.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.
- package/lib/module/Screens/Static/ResultScreen.js +10 -2
- package/lib/module/version.js +1 -1
- package/lib/typescript/src/Screens/Static/ResultScreen.d.ts.map +1 -1
- package/lib/typescript/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/Screens/Static/ResultScreen.tsx +14 -2
- package/src/version.ts +1 -1
|
@@ -8,6 +8,7 @@ import httpClient, { getSessionToken } from "../../Shared/Libs/http-client.js";
|
|
|
8
8
|
import RNFS from 'react-native-fs';
|
|
9
9
|
import NativeProgressBar from "../../Shared/Components/NativeProgressBar.js";
|
|
10
10
|
import LottieView from 'lottie-react-native';
|
|
11
|
+
import { Buffer } from 'buffer';
|
|
11
12
|
import { runWithRetry } from "../../Shared/Libs/promise.utils.js";
|
|
12
13
|
import { useStatusBarWhiteBackground } from "../../Shared/Libs/status-bar.utils.js";
|
|
13
14
|
import NavigationManager from "../../Shared/Components/NavigationManager.js";
|
|
@@ -432,9 +433,16 @@ const ResultScreen = () => {
|
|
|
432
433
|
'X-Session-Token': consentSessionToken
|
|
433
434
|
} : {})
|
|
434
435
|
},
|
|
436
|
+
// react-native-fs's native multipart encoder writes `fields` values
|
|
437
|
+
// into the body WITHOUT a UTF-8 charset, so non-ASCII (Turkish ı ş ğ ü
|
|
438
|
+
// ç İ etc.) is mangled in transit ("Kişisel" → "Ki_isel", "sayılı" →
|
|
439
|
+
// "say1l1"). Base64-encode the UTF-8 bytes so the field value is pure
|
|
440
|
+
// ASCII and survives the encoder intact; the server decodes it when the
|
|
441
|
+
// `consentEncoding=base64` marker is present.
|
|
435
442
|
fields: {
|
|
436
|
-
|
|
437
|
-
|
|
443
|
+
consentEncoding: 'base64',
|
|
444
|
+
consentTitle: Buffer.from(consentVideo.title, 'utf8').toString('base64'),
|
|
445
|
+
consentText: Buffer.from(consentVideo.text, 'utf8').toString('base64')
|
|
438
446
|
},
|
|
439
447
|
files: [{
|
|
440
448
|
name: 'files',
|
package/lib/module/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultScreen.d.ts","sourceRoot":"","sources":["../../../../../src/Screens/Static/ResultScreen.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResultScreen.d.ts","sourceRoot":"","sources":["../../../../../src/Screens/Static/ResultScreen.tsx"],"names":[],"mappings":"AA8EA,QAAA,MAAM,YAAY,+CA+vCjB,CAAC;AAoMF,eAAe,YAAY,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.514.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -26,6 +26,7 @@ import type {
|
|
|
26
26
|
ScannedIdentityDocument,
|
|
27
27
|
VerbalConsentVideo,
|
|
28
28
|
} from '../../Shared/Types/identificationInfo';
|
|
29
|
+
import { Buffer } from 'buffer';
|
|
29
30
|
import { runWithRetry } from '../../Shared/Libs/promise.utils';
|
|
30
31
|
import { useStatusBarWhiteBackground } from '../../Shared/Libs/status-bar.utils';
|
|
31
32
|
import NavigationManager, {
|
|
@@ -591,9 +592,20 @@ const ResultScreen = () => {
|
|
|
591
592
|
? { 'X-Session-Token': consentSessionToken }
|
|
592
593
|
: {}),
|
|
593
594
|
},
|
|
595
|
+
// react-native-fs's native multipart encoder writes `fields` values
|
|
596
|
+
// into the body WITHOUT a UTF-8 charset, so non-ASCII (Turkish ı ş ğ ü
|
|
597
|
+
// ç İ etc.) is mangled in transit ("Kişisel" → "Ki_isel", "sayılı" →
|
|
598
|
+
// "say1l1"). Base64-encode the UTF-8 bytes so the field value is pure
|
|
599
|
+
// ASCII and survives the encoder intact; the server decodes it when the
|
|
600
|
+
// `consentEncoding=base64` marker is present.
|
|
594
601
|
fields: {
|
|
595
|
-
|
|
596
|
-
|
|
602
|
+
consentEncoding: 'base64',
|
|
603
|
+
consentTitle: Buffer.from(consentVideo.title, 'utf8').toString(
|
|
604
|
+
'base64'
|
|
605
|
+
),
|
|
606
|
+
consentText: Buffer.from(consentVideo.text, 'utf8').toString(
|
|
607
|
+
'base64'
|
|
608
|
+
),
|
|
597
609
|
},
|
|
598
610
|
files: [
|
|
599
611
|
{
|
package/src/version.ts
CHANGED