partner_react_native_sdk 0.1.4 → 0.1.6

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.
@@ -10,292 +10,298 @@ import { StatusBar } from 'react-native';
10
10
  export type { WebViewCallbackFunction } from './utils/webviewCallback';
11
11
  import { AnalyticsLogger } from './analytics/analytics_logger';
12
12
  type InitOptions = {
13
- whitelistedDomains: string[];
14
- deviceBindingEnabled: boolean;
13
+ whitelistedDomains: string[];
14
+ deviceBindingEnabled: boolean;
15
15
  };
16
16
 
17
-
18
17
  export class PartnerLibrary {
18
+ private static instance: PartnerLibrary | null = null;
19
+ private static intialized = false;
19
20
 
20
- private static instance: PartnerLibrary | null = null;
21
- private static intialized = false;
22
-
23
- private _apiCall = new APICall();
24
- static webViewCallback: WebViewCallbackFunction;
25
- private _analyticsLogger!: AnalyticsLogger;
26
- private constructor() { }
21
+ private _apiCall = new APICall();
22
+ static webViewCallback: WebViewCallbackFunction;
23
+ private _analyticsLogger!: AnalyticsLogger;
24
+ private constructor() {}
27
25
 
28
- static getInstance(): PartnerLibrary {
29
- if (!PartnerLibrary.instance) {
30
- PartnerLibrary.instance = new PartnerLibrary();
31
- }
32
- return PartnerLibrary.instance;
26
+ static getInstance(): PartnerLibrary {
27
+ if (!PartnerLibrary.instance) {
28
+ PartnerLibrary.instance = new PartnerLibrary();
33
29
  }
34
-
35
- static async init(hostName: string, options: InitOptions = {
36
- whitelistedDomains: [],
37
- deviceBindingEnabled: false
38
- }): Promise<void> {
39
- // console.log("PartnerLibrary.init - initialized:", PartnerLibrary.intialized);
40
- if (PartnerLibrary.intialized) return;
41
-
42
- try {
43
- // Ensure instance exists before setup
44
- if (!PartnerLibrary.instance) {
45
- // console.log("PartnerLibrary.init - creating new instance");
46
- PartnerLibrary.instance = new PartnerLibrary();
47
- }
48
- await PartnerLibrary.instance._setup(hostName, options.whitelistedDomains, options.deviceBindingEnabled);
49
- PartnerLibrary.intialized = true;
50
- }
51
- catch (error) {
52
- console.error("Initialization failed: ", error);
53
- throw new Error("Initialization failed");
54
- }
30
+ return PartnerLibrary.instance;
31
+ }
32
+
33
+ static async init(
34
+ hostName: string,
35
+ options: InitOptions = {
36
+ whitelistedDomains: [],
37
+ deviceBindingEnabled: false,
55
38
  }
56
-
57
- private async _setup(
58
- hostName: string,
59
- whitelistedDomains: string[],
60
- deviceBindingEnabled: boolean
61
- ): Promise<void> {
62
-
63
-
64
- LibraryConstants.init({
65
- host: hostName,
66
- whitelistedDomains: whitelistedDomains,
67
- deviceBinding: deviceBindingEnabled
68
- });
69
- this._analyticsLogger = new AnalyticsLogger();
70
- this._analyticsLogger.logEvent({ "event": "REACT_NATIVE_INTIALIZED" })
39
+ ): Promise<void> {
40
+ // console.log("PartnerLibrary.init - initialized:", PartnerLibrary.intialized);
41
+ if (PartnerLibrary.intialized) return;
42
+
43
+ try {
44
+ // Ensure instance exists before setup
45
+ if (!PartnerLibrary.instance) {
46
+ // console.log("PartnerLibrary.init - creating new instance");
47
+ PartnerLibrary.instance = new PartnerLibrary();
48
+ }
49
+ await PartnerLibrary.instance._setup(
50
+ hostName,
51
+ options.whitelistedDomains,
52
+ options.deviceBindingEnabled
53
+ );
54
+ PartnerLibrary.intialized = true;
55
+ } catch (error) {
56
+ console.error('Initialization failed: ', error);
57
+ throw new Error('Initialization failed');
71
58
  }
72
-
73
- async open(
74
- module: string,
75
- token: string,
76
- WebViewCallbackFunction: WebViewCallbackFunction,
77
-
78
- ): Promise<React.ReactElement> {
79
-
80
- this._analyticsLogger.logEvent({ "event": "REACT_NATIVE_OPEN_FN_CALLED" })
81
-
82
- if (!PartnerLibrary.intialized) {
83
- throw new Error('PartnerLibrary not initialized. Call init() first.');
84
- }
85
- try {
86
- let bank = "";
87
-
88
- if (module.includes("banking/")) {
89
- const startIndex = module.indexOf("banking/") + "banking/".length;
90
- const temp = module.substring(startIndex);
91
- const endIndex = temp.indexOf("/");
92
- bank = endIndex === -1 ? temp : temp.substring(0, endIndex);
93
- }
94
-
95
- return this._loginAndNavigateToWebView(module, bank, token, WebViewCallbackFunction);
96
- } catch (e) {
97
- console.error('Error opening webview:', e);
98
- throw e;
99
- }
59
+ }
60
+
61
+ private async _setup(
62
+ hostName: string,
63
+ whitelistedDomains: string[],
64
+ deviceBindingEnabled: boolean
65
+ ): Promise<void> {
66
+ LibraryConstants.init({
67
+ host: hostName,
68
+ whitelistedDomains: whitelistedDomains,
69
+ deviceBinding: deviceBindingEnabled,
70
+ });
71
+ this._analyticsLogger = new AnalyticsLogger();
72
+ // this._analyticsLogger.logEvent({ event: 'REACT_NATIVE_INTIALIZED' });
73
+ }
74
+
75
+ async open(
76
+ module: string,
77
+ token: string,
78
+ WebViewCallbackFunction: WebViewCallbackFunction
79
+ ): Promise<React.ReactElement> {
80
+ // this._analyticsLogger.logEvent({ event: 'REACT_NATIVE_OPEN_FN_CALLED' });
81
+
82
+ if (!PartnerLibrary.intialized) {
83
+ throw new Error('PartnerLibrary not initialized. Call init() first.');
100
84
  }
101
-
102
-
103
- private async _checkDeviceBinding(
104
- bank: string,
105
- url: string,
106
- WebViewCallbackFunction: WebViewCallbackFunction,
107
-
108
- ): Promise<React.ReactElement> {
109
- this._analyticsLogger.logEvent({ "event": "REACT_NATIVE_DEVICE_BINDING_CALLED" })
110
-
111
- console.log("entered in check device binding")
112
- if (LibraryConstants.deviceBindingEnabled) {
113
- // TODO: Build the device binding flow
114
- return Promise.resolve(<></>);
115
-
116
- } else {
117
- console.log("calling setup device session")
118
-
119
- return this._setupDeviceSession(bank, url, WebViewCallbackFunction);
120
- }
85
+ try {
86
+ let bank = '';
87
+
88
+ if (module.includes('banking/')) {
89
+ const startIndex = module.indexOf('banking/') + 'banking/'.length;
90
+ const temp = module.substring(startIndex);
91
+ const endIndex = temp.indexOf('/');
92
+ bank = endIndex === -1 ? temp : temp.substring(0, endIndex);
93
+ }
94
+
95
+ return this._loginAndNavigateToWebView(
96
+ module,
97
+ bank,
98
+ token,
99
+ WebViewCallbackFunction
100
+ );
101
+ } catch (e) {
102
+ console.error('Error opening webview:', e);
103
+ throw e;
121
104
  }
122
-
123
- private async _loginAndNavigateToWebView(
124
- module: string,
125
- bank: string,
126
- token: string,
127
- WebViewCallbackFunction: WebViewCallbackFunction,
128
-
129
- ): Promise<React.ReactElement> {
130
- // console.log("PartnerLibrary._loginAndNavigateToWebView - LibraryConstants.hostName:", LibraryConstants.hostName);
131
- try {
132
- this._analyticsLogger.logEvent({ "event": "REACT_NATIVE_LOGIN_FN_CALLED" })
133
- let tokenResponse: any;
134
- const url = ServiceNames.LOGIN_URL;
135
- console.log("url is : ", url)
136
- tokenResponse = await this._apiCall.callAPI(
137
- 'POST',
138
- ServiceNames.LOGIN_URL, {
139
- body: {
140
- 'token': token
141
- }
142
- }
143
- );
144
- this._analyticsLogger.logEvent({ "event": "REACT_NATIVE_LOGIN_FN_RESPONSE :", "response": tokenResponse })
145
-
146
-
147
- if (tokenResponse?.data?.code === "USER_TOKEN_EXPIRED") {
148
- console.log("Token expired");
149
- return Promise.resolve(<></>);
150
- }
151
-
152
- if (
153
- tokenResponse &&
154
- tokenResponse.data &&
155
- typeof tokenResponse.data === 'object' &&
156
- tokenResponse.data !== null &&
157
- 'RATE_LIMIT_USER' in tokenResponse.data
158
- ) {
159
- console.log("rate limit user");
160
- }
161
-
162
- // console.log("Checking login success condition:", {
163
- // statusCode: tokenResponse?.statusCode,
164
- // code: tokenResponse?.data?.code
165
- // });
166
-
167
- if (tokenResponse?.data?.code === "USER_LOGIN_SUCCESS") {
168
- console.log("User login success");
169
- this.fetchAndSetTheme();
170
- return this._checkDeviceBinding(bank, module, WebViewCallbackFunction);
171
- } else {
172
- console.log("Login not successful. Token Response:", tokenResponse);
173
- return Promise.resolve(<></>);
174
- }
175
-
176
- } catch (e) {
177
- console.error('Error during login:', e);
178
- throw e;
179
- }
180
-
181
-
105
+ }
106
+
107
+ private async _checkDeviceBinding(
108
+ bank: string,
109
+ url: string,
110
+ WebViewCallbackFunction: WebViewCallbackFunction
111
+ ): Promise<React.ReactElement> {
112
+ // this._analyticsLogger.logEvent({
113
+ // event: 'REACT_NATIVE_DEVICE_BINDING_CALLED',
114
+ // });
115
+
116
+ console.log('SDK:LOG: entered in check device binding');
117
+ if (LibraryConstants.deviceBindingEnabled) {
118
+ // TODO: Build the device binding flow
119
+ return Promise.resolve(<></>);
120
+ } else {
121
+ console.log('SDK:LOG: calling setup device session');
122
+
123
+ return this._setupDeviceSession(bank, url, WebViewCallbackFunction);
182
124
  }
183
-
184
- private async _setupDeviceSession(
185
- bank: string,
186
- url: string,
187
- WebViewCallbackFunction: WebViewCallbackFunction,
188
-
189
- ): Promise<React.ReactElement> {
190
- try {
191
- console.log("in setup device session")
192
-
193
- const deviceInfo = await DeviceInfoManager.getDeviceInfo();
194
- const appVersion = deviceInfo['app_version'] || 'unknown';
195
-
196
- if (__DEV__) {
197
- console.log("Device Info:", deviceInfo);
198
- console.log("App Version:", appVersion);
199
- }
200
- console.log("device uuid is : ", deviceInfo[Constants.DEVICE_UUID]);
201
-
202
- const response = await this._apiCall.callAPI(
203
- 'POST',
204
- ServiceNames.DEVICE_SESSION.params({ "partner": bank }),
205
- {
206
- body: {
207
- [Constants.MANUFACTURER]: deviceInfo[Constants.MANUFACTURER],
208
- [Constants.MODEL]: deviceInfo[Constants.MODEL],
209
- [Constants.DEVICE_UUID]: deviceInfo[Constants.DEVICE_UUID],
210
- [Constants.OS]: deviceInfo[Constants.OS],
211
- [Constants.OS_VERSION]: deviceInfo[Constants.OS_VERSION],
212
- [Constants.APP_VERSION]: appVersion,
213
- }
214
- }
215
- );
216
- //console.log("response from setup device session is : ", response)
217
- if (
218
- response &&
219
- response.data &&
220
- typeof response.data === 'object' &&
221
- response.data !== null &&
222
- 'RATE_LIMIT_USER' in response.data
223
- ) {
224
- console.log("rate limit user");
225
- }
226
-
227
- if (response?.status === 200) {
228
-
229
- return this._openWebView(url, WebViewCallbackFunction);
230
- } else {
231
- console.warn('Error setting up device session:', response);
232
- return this._openWebView(url, WebViewCallbackFunction);
233
- }
234
- } catch (e) {
235
- console.error('Error setting up device session:', e);
236
- throw e;
125
+ }
126
+
127
+ private async _loginAndNavigateToWebView(
128
+ module: string,
129
+ bank: string,
130
+ token: string,
131
+ WebViewCallbackFunction: WebViewCallbackFunction
132
+ ): Promise<React.ReactElement> {
133
+ // console.log("PartnerLibrary._loginAndNavigateToWebView - LibraryConstants.hostName:", LibraryConstants.hostName);
134
+ try {
135
+ // this._analyticsLogger.logEvent({ event: 'REACT_NATIVE_LOGIN_FN_CALLED' });
136
+ let tokenResponse: any;
137
+ const url = ServiceNames.LOGIN_URL;
138
+ console.log('SDK:LOG: ', url);
139
+ tokenResponse = await this._apiCall.callAPI(
140
+ 'POST',
141
+ ServiceNames.LOGIN_URL,
142
+ {
143
+ body: {
144
+ token: token,
145
+ },
237
146
  }
238
- }
239
-
240
-
241
-
242
- async _openWebView(
243
- url: string,
244
- WebViewCallbackFunction: WebViewCallbackFunction,
245
- ): Promise<React.ReactElement> {
246
- console.log("entered in open web view");
247
- console.log("url is : ", LibraryConstants.hostName + url);
248
- this._analyticsLogger.logEvent({ "event": "REACT_NATIVE_WEBVIEW_OPEN_CALLED" })
249
-
250
-
251
- return (
252
- <SafeAreaView style={{ flex: 1 }}>
253
- <WebView
254
- url={LibraryConstants.hostName + url}
255
- onCallback={WebViewCallbackFunction}
256
- whitelistedUrls={LibraryConstants.whitelistedDomains}
257
- hostName={LibraryConstants.hostName}
258
- onPageFinished={() => console.log('WebView page finished loading')}
259
- />
260
- </SafeAreaView>
147
+ );
148
+ // this._analyticsLogger.logEvent({
149
+ // event: 'REACT_NATIVE_LOGIN_FN_RESPONSE :',
150
+ // response: tokenResponse,
151
+ // });
152
+
153
+ if (tokenResponse?.data?.code === 'USER_TOKEN_EXPIRED') {
154
+ console.log('SDK:LOG Token expired');
155
+ return Promise.resolve(<></>);
156
+ }
157
+
158
+ if (
159
+ tokenResponse &&
160
+ tokenResponse.data &&
161
+ typeof tokenResponse.data === 'object' &&
162
+ tokenResponse.data !== null &&
163
+ 'RATE_LIMIT_USER' in tokenResponse.data
164
+ ) {
165
+ console.log('SDK:LOG: rate limit user');
166
+ }
167
+
168
+ // console.log("Checking login success condition:", {
169
+ // statusCode: tokenResponse?.statusCode,
170
+ // code: tokenResponse?.data?.code
171
+ // });
172
+
173
+ if (tokenResponse?.data?.code === 'USER_LOGIN_SUCCESS') {
174
+ console.log('SDK:LOG: User login success');
175
+ this.fetchAndSetTheme();
176
+ return this._checkDeviceBinding(bank, module, WebViewCallbackFunction);
177
+ } else {
178
+ console.log(
179
+ 'SDK:LOG: Login not successful. Token Response:',
180
+ tokenResponse
261
181
  );
182
+ return Promise.resolve(<></>);
183
+ }
184
+ } catch (e) {
185
+ console.error('SDK:LOG: Error during login:', e);
186
+ throw e;
262
187
  }
263
-
264
- async fetchAndSetTheme(): Promise<void> {
265
- try {
266
- console.log("Fetching theme from API");
267
-
268
- const themeResponse: any = await this._apiCall.callAPI(
269
- 'GET',
270
- ServiceNames.THEME_URL
271
- );
272
- const theme = themeResponse?.data;
273
-
274
- if (theme && theme["--color-primary-500"]) {
275
- const rgbValues = theme["--color-primary-500"].split(" ").map(Number);
276
- if (rgbValues.length === 3) {
277
- const [r, g, b] = rgbValues;
278
-
279
- // Update LibraryConstants color
280
- LibraryConstants.setPrimaryColorFromRGB(r, g, b);
281
-
282
- // Set status bar color
283
-
284
- StatusBar.setBackgroundColor(LibraryConstants.primaryColor);
285
- StatusBar.setBarStyle('light-content');
286
-
287
-
288
- console.log("Theme color set successfully:", LibraryConstants.primaryColor);
289
- } else {
290
- console.warn("Invalid RGB values in theme response");
291
- }
292
- } else {
293
- console.warn("--color-primary-500 not found in theme response");
294
- }
295
- } catch (e) {
296
- console.error("Error Fetching theme: ", e);
297
- throw e;
188
+ }
189
+
190
+ private async _setupDeviceSession(
191
+ bank: string,
192
+ url: string,
193
+ WebViewCallbackFunction: WebViewCallbackFunction
194
+ ): Promise<React.ReactElement> {
195
+ try {
196
+ console.log('SDK:LOG: in setup device session');
197
+
198
+ const deviceInfo = await DeviceInfoManager.getDeviceInfo();
199
+ const appVersion = deviceInfo['app_version'] || 'unknown';
200
+
201
+ if (__DEV__) {
202
+ console.log('Device Info:', deviceInfo);
203
+ console.log('App Version:', appVersion);
204
+ }
205
+ console.log('SDK:LOG device uuid is ');
206
+
207
+ const response = await this._apiCall.callAPI(
208
+ 'POST',
209
+ ServiceNames.DEVICE_SESSION.params({ partner: bank }),
210
+ {
211
+ body: {
212
+ [Constants.MANUFACTURER]: deviceInfo[Constants.MANUFACTURER],
213
+ [Constants.MODEL]: deviceInfo[Constants.MODEL],
214
+ [Constants.DEVICE_UUID]: deviceInfo[Constants.DEVICE_UUID],
215
+ [Constants.OS]: deviceInfo[Constants.OS],
216
+ [Constants.OS_VERSION]: deviceInfo[Constants.OS_VERSION],
217
+ [Constants.APP_VERSION]: appVersion,
218
+ },
298
219
  }
220
+ );
221
+ //console.log("response from setup device session is : ", response)
222
+ if (
223
+ response &&
224
+ response.data &&
225
+ typeof response.data === 'object' &&
226
+ response.data !== null &&
227
+ 'RATE_LIMIT_USER' in response.data
228
+ ) {
229
+ console.log('SDK:LOG: rate limit user');
230
+ }
231
+
232
+ if (response?.status === 200) {
233
+ return this._openWebView(url, WebViewCallbackFunction);
234
+ } else {
235
+ console.warn('SDK:LOG: Error setting up device session:', response);
236
+ return this._openWebView(url, WebViewCallbackFunction);
237
+ }
238
+ } catch (e) {
239
+ console.error('SDK:LOG: Error setting up device session:', e);
240
+ throw e;
299
241
  }
300
-
301
- }
242
+ }
243
+
244
+ async _openWebView(
245
+ url: string,
246
+ WebViewCallbackFunction: WebViewCallbackFunction
247
+ ): Promise<React.ReactElement> {
248
+ console.log('SDK:LOG: entered in open web view');
249
+ console.log('SDK:LOG: url is : ', LibraryConstants.hostName + url);
250
+ // this._analyticsLogger.logEvent({
251
+ // event: 'REACT_NATIVE_WEBVIEW_OPEN_CALLED',
252
+ // });
253
+
254
+ return (
255
+ <SafeAreaView style={{ flex: 1 }}>
256
+ <WebView
257
+ url={LibraryConstants.hostName + url}
258
+ onCallback={WebViewCallbackFunction}
259
+ whitelistedUrls={LibraryConstants.whitelistedDomains}
260
+ hostName={LibraryConstants.hostName}
261
+ onPageFinished={() =>
262
+ console.log('SDK:LOG: WebView page finished loading')
263
+ }
264
+ />
265
+ </SafeAreaView>
266
+ );
267
+ }
268
+
269
+ async fetchAndSetTheme(): Promise<void> {
270
+ try {
271
+ console.log('SDK:LOG: Fetching theme from API');
272
+
273
+ const themeResponse: any = await this._apiCall.callAPI(
274
+ 'GET',
275
+ ServiceNames.THEME_URL
276
+ );
277
+ const theme = themeResponse?.data;
278
+
279
+ if (theme && theme['--color-primary-500']) {
280
+ const rgbValues = theme['--color-primary-500'].split(' ').map(Number);
281
+ if (rgbValues.length === 3) {
282
+ const [r, g, b] = rgbValues;
283
+
284
+ // Update LibraryConstants color
285
+ LibraryConstants.setPrimaryColorFromRGB(r, g, b);
286
+
287
+ // Set status bar color
288
+
289
+ StatusBar.setBackgroundColor(LibraryConstants.primaryColor);
290
+ StatusBar.setBarStyle('light-content');
291
+
292
+ console.log(
293
+ 'SDK:LOG: Theme color set successfully:',
294
+ LibraryConstants.primaryColor
295
+ );
296
+ } else {
297
+ console.warn('Invalid RGB values in theme response');
298
+ }
299
+ } else {
300
+ console.warn('--color-primary-500 not found in theme response');
301
+ }
302
+ } catch (e) {
303
+ console.error('Error Fetching theme: ', e);
304
+ throw e;
305
+ }
306
+ }
307
+ }
@@ -47,6 +47,14 @@ interface WebViewCustomProps {
47
47
  whitelistedUrls?: string[];
48
48
  onPageFinished?: () => void;
49
49
  }
50
+ const clearAllCookies = async () => {
51
+ try {
52
+ await CookieManager.clearAll(true);
53
+ console.log('clearing cookies');
54
+ } catch (e) {
55
+ console.error('Failed to clear cookies:', e);
56
+ }
57
+ };
50
58
 
51
59
  export const WebView = ({
52
60
  url,
@@ -81,18 +89,32 @@ export const WebView = ({
81
89
  };
82
90
  const showToast_with_code_message = (syntheticEvent: any) => {
83
91
  const { nativeEvent } = syntheticEvent;
84
- const errorCodesToHandle = [-6, -8, -10];
92
+ const errorCodesToHandle = [-2, -6, -8, -10];
85
93
  if (errorCodesToHandle.includes(nativeEvent.code)) {
86
94
  const message = `WebView Error: [${nativeEvent.code}] ${nativeEvent.description}`;
87
95
  setToast({ visible: true, message });
88
- if (Platform.OS === 'android') {
89
- ToastAndroid.show(
90
- 'Oops! Something went wrong. Please try again.',
91
- ToastAndroid.LONG
92
- );
96
+
97
+ if (nativeEvent.code === -2) {
98
+ if (Platform.OS === 'android') {
99
+ ToastAndroid.show(
100
+ 'There seems to be a network issue. Please try again.',
101
+ ToastAndroid.LONG
102
+ );
103
+ }
104
+ clearAllCookies();
105
+ onCallback?.(WebViewCallback.redirect('WEBVIEW_ERROR'));
106
+ } else {
107
+ if (Platform.OS === 'android') {
108
+ ToastAndroid.show(
109
+ 'Oops! Something went wrong. Please try again.',
110
+ ToastAndroid.LONG
111
+ );
112
+ }
113
+ clearAllCookies();
114
+ onCallback?.(WebViewCallback.redirect('WEBVIEW_ERROR'));
93
115
  }
94
- setTimeout(() => setToast(null), 5000);
95
- onCallback?.(WebViewCallback.redirect('WEBVIEW_ERROR'));
116
+
117
+ setTimeout(() => setToast(null), 6000);
96
118
  }
97
119
  };
98
120
 
@@ -196,9 +218,18 @@ export const WebView = ({
196
218
  // });
197
219
 
198
220
  StatusBar.setBackgroundColor('#7E7E7EFF');
221
+ clearAllCookies();
199
222
  onCallback?.(WebViewCallback.redirect(status ?? undefined));
200
223
  return false;
201
224
  }
225
+ if (url?.includes('/api/user/redirect')) {
226
+ console.log('overriding redirect url');
227
+
228
+ StatusBar.setBackgroundColor('#7E7E7EFF');
229
+ clearAllCookies();
230
+ onCallback?.(WebViewCallback.redirect('SESSION_EXPIRED'));
231
+ return false;
232
+ }
202
233
 
203
234
  // Handle whitelisted URLs
204
235
  const isWhitelisted =
@@ -331,10 +362,6 @@ export const WebView = ({
331
362
 
332
363
  const handleWebViewLoadEnd = (syntheticEvent: any) => {
333
364
  const loadedUrl = syntheticEvent?.nativeEvent?.url || url;
334
- // _analyticsLogger.logEvent({
335
- // event: 'REACT_NATIVE_WEBVIEW_LOADED',
336
- // url: loadedUrl,
337
- // });
338
365
 
339
366
  onPageFinished?.();
340
367
  };