@trustchex/react-native-sdk 1.249.0 → 1.250.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.
@@ -70,22 +70,17 @@ const Trustchex = ({
70
70
  initializeTTS();
71
71
  }, []);
72
72
  useEffect(() => {
73
- const timer = setTimeout(() => {
74
- let shouldUpdate = false;
75
- if (propBaseUrl && propBaseUrl !== baseUrl) {
76
- shouldUpdate = true;
77
- }
78
- if (propSessionId !== undefined && propSessionId !== sessionId) {
79
- shouldUpdate = true;
80
- }
81
- if (shouldUpdate && propBaseUrl && propSessionId !== undefined) {
82
- setBaseUrl(propBaseUrl);
83
- setSessionId(propSessionId);
84
- }
85
- setIsInitialized(true);
86
- }, 100);
87
- return () => clearTimeout(timer);
88
- }, [propBaseUrl, propSessionId, baseUrl, sessionId]);
73
+ if (propSessionId) {
74
+ setSessionId(propSessionId);
75
+ }
76
+ if (propBaseUrl) {
77
+ setBaseUrl(propBaseUrl);
78
+ const timer = setTimeout(() => {
79
+ setIsInitialized(true);
80
+ }, 1000);
81
+ return () => clearTimeout(timer);
82
+ }
83
+ }, [propBaseUrl, propSessionId]);
89
84
  useEffect(() => {
90
85
  if (propLocale) {
91
86
  setLocale(propLocale);
@@ -1 +1 @@
1
- {"version":3,"file":"Trustchex.d.ts","sourceRoot":"","sources":["../../../src/Trustchex.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAK5D,OAAO,gCAAgC,CAAC;AAexC,UAAU,iBAAiB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,cAAc;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AASD,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA2IvC,CAAC;AAWF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"Trustchex.d.ts","sourceRoot":"","sources":["../../../src/Trustchex.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAK5D,OAAO,gCAAgC,CAAC;AAexC,UAAU,iBAAiB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,cAAc;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AASD,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAmIvC,CAAC;AAWF,eAAe,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trustchex/react-native-sdk",
3
- "version": "1.249.0",
3
+ "version": "1.250.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",
package/src/Trustchex.tsx CHANGED
@@ -101,27 +101,19 @@ const Trustchex: React.FC<TrustchexProps> = ({
101
101
  }, []);
102
102
 
103
103
  useEffect(() => {
104
- const timer = setTimeout(() => {
105
- let shouldUpdate = false;
106
-
107
- if (propBaseUrl && propBaseUrl !== baseUrl) {
108
- shouldUpdate = true;
109
- }
110
-
111
- if (propSessionId !== undefined && propSessionId !== sessionId) {
112
- shouldUpdate = true;
113
- }
114
-
115
- if (shouldUpdate && propBaseUrl && propSessionId !== undefined) {
116
- setBaseUrl(propBaseUrl);
117
- setSessionId(propSessionId);
118
- }
104
+ if (propSessionId) {
105
+ setSessionId(propSessionId);
106
+ }
119
107
 
120
- setIsInitialized(true);
121
- }, 100);
108
+ if (propBaseUrl) {
109
+ setBaseUrl(propBaseUrl);
110
+ const timer = setTimeout(() => {
111
+ setIsInitialized(true);
112
+ }, 1000);
122
113
 
123
- return () => clearTimeout(timer);
124
- }, [propBaseUrl, propSessionId, baseUrl, sessionId]);
114
+ return () => clearTimeout(timer);
115
+ }
116
+ }, [propBaseUrl, propSessionId]);
125
117
 
126
118
  useEffect(() => {
127
119
  if (propLocale) {