@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.
@@ -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
- consentTitle: consentVideo.title,
437
- consentText: consentVideo.text
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',
@@ -2,4 +2,4 @@
2
2
 
3
3
  // This file is auto-generated. Do not edit manually.
4
4
  // Version is synced from package.json during build.
5
- export const SDK_VERSION = '1.513.3';
5
+ export const SDK_VERSION = '1.514.0';
@@ -1 +1 @@
1
- {"version":3,"file":"ResultScreen.d.ts","sourceRoot":"","sources":["../../../../../src/Screens/Static/ResultScreen.tsx"],"names":[],"mappings":"AA6EA,QAAA,MAAM,YAAY,+CAovCjB,CAAC;AAoMF,eAAe,YAAY,CAAC"}
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.513.3";
1
+ export declare const SDK_VERSION = "1.514.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trustchex/react-native-sdk",
3
- "version": "1.513.3",
3
+ "version": "1.514.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",
@@ -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
- consentTitle: consentVideo.title,
596
- consentText: consentVideo.text,
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
@@ -1,3 +1,3 @@
1
1
  // This file is auto-generated. Do not edit manually.
2
2
  // Version is synced from package.json during build.
3
- export const SDK_VERSION = '1.513.3';
3
+ export const SDK_VERSION = '1.514.0';