@quiltt/react-native 3.6.8 → 3.6.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @quiltt/react-native
2
2
 
3
+ ## 3.6.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [#260](https://github.com/quiltt/quiltt-js/pull/260) [`6e80930`](https://github.com/quiltt/quiltt-js/commit/6e80930f84013f483e2c75fcb37a28dc4996dadc) Thanks [@zubairaziz](https://github.com/zubairaziz)! - Refactor QuilttConnector to remove URL allow list
8
+
9
+ - Updated dependencies [[`6e80930`](https://github.com/quiltt/quiltt-js/commit/6e80930f84013f483e2c75fcb37a28dc4996dadc)]:
10
+ - @quiltt/core@3.6.9
11
+ - @quiltt/react@3.6.9
12
+
3
13
  ## 3.6.8
4
14
 
5
15
  ### Patch Changes
package/README.md CHANGED
@@ -27,11 +27,11 @@ Launch the [Quiltt Connector](https://www.quiltt.dev/connector) in a webview.
27
27
 
28
28
  `@quiltt/react-native` does not include any navigation library, you might want to navigate to a new "page" when using QuilttConnector to get the best result.
29
29
 
30
- For simple usage of `react-navigation`, please see [App.tsx](examples/expo/App.tsx) and [ConnectorScreen.tsx](examples/expo/screens/ConnectorScreen.tsx).
30
+ For simple usage of `react-navigation`, please see [App.tsx](../../examples/react-native-expo/App.tsx) and [ConnectorScreen.tsx](../../examples/react-native-expo/screens/ConnectorScreen.tsx).
31
31
 
32
32
  #### Example
33
33
 
34
- ```typescript
34
+ ```tsx
35
35
  import { useState } from 'react'
36
36
  import { QuilttProvider } from '@quiltt/react'
37
37
  import { QuilttConnector } from '@quiltt/react-native'
package/dist/index.cjs CHANGED
@@ -11,7 +11,7 @@ var reactNative = require('react-native');
11
11
  var util = require('@honeybadger-io/core/build/src/util');
12
12
 
13
13
  // Generated by genversion.
14
- const version = '3.6.8';
14
+ const version = '3.6.9';
15
15
 
16
16
  const AndroidSafeAreaView = ({ testId, children })=>/*#__PURE__*/ jsxRuntime.jsx(reactNative.SafeAreaView, {
17
17
  testID: testId,
@@ -319,31 +319,30 @@ const QuilttConnector = ({ testId, connectorId, connectionId, institution, oauth
319
319
  institution,
320
320
  session?.token
321
321
  ]);
322
- // allowedListUrl & shouldRender ensure we are only rendering Quiltt, MX and Plaid content in Webview
322
+ // urlAllowList & shouldRender ensure we are only rendering Quiltt, MX and Plaid content in Webview
323
323
  // For other urls, we assume those are bank urls, which need to be handled in external browser.
324
- // TODO: Convert it to a list from Quiltt Server to prevent MX/ Plaid changes.
325
- const allowedListUrl = react$1.useMemo(()=>[
326
- 'quiltt.io',
327
- 'quiltt.app',
328
- 'quiltt.dev',
329
- 'moneydesktop.com',
330
- 'plaid.com',
331
- 'https://cdn.plaid.com/link',
332
- 'https://www.google.com/recaptcha',
333
- 'https://challenges.cloudflare.com',
334
- 'https://api.stripe.com',
335
- 'https://cdn.jsdelivr.net',
336
- 'https://auth0.com'
337
- ], []);
324
+ // TODO: Need to regroup on this and figure out a better way to handle a URL allow list
325
+ // const urlAllowList = useMemo(
326
+ // () => [
327
+ // 'quiltt.io',
328
+ // 'quiltt.app',
329
+ // 'quiltt.dev',
330
+ // 'moneydesktop.com',
331
+ // 'plaid.com',
332
+ // 'https://cdn.plaid.com/link',
333
+ // 'https://www.google.com/recaptcha',
334
+ // 'https://challenges.cloudflare.com',
335
+ // 'https://api.stripe.com',
336
+ // 'https://cdn.jsdelivr.net',
337
+ // 'https://auth0.com',
338
+ // ],
339
+ // []
340
+ // )
338
341
  const isQuilttEvent = react$1.useCallback((url)=>url.protocol === 'quilttconnector:', []);
339
342
  const shouldRender = react$1.useCallback((url)=>{
340
343
  if (isQuilttEvent(url)) return false;
341
- if (url.protocol !== 'https:') {
342
- return false;
343
- }
344
- return allowedListUrl.some((href)=>url.href.includes(href));
344
+ return url.protocol === 'https:';
345
345
  }, [
346
- allowedListUrl,
347
346
  isQuilttEvent
348
347
  ]);
349
348
  const clearLocalStorage = ()=>{
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ import { StyleSheet, Platform, StatusBar, SafeAreaView, View, Text, Pressable, A
10
10
  import { generateStackTrace, makeBacktrace, getCauses } from '@honeybadger-io/core/build/src/util';
11
11
 
12
12
  // Generated by genversion.
13
- const version = '3.6.8';
13
+ const version = '3.6.9';
14
14
 
15
15
  const AndroidSafeAreaView = ({ testId, children })=>/*#__PURE__*/ jsx(SafeAreaView, {
16
16
  testID: testId,
@@ -318,31 +318,30 @@ const QuilttConnector = ({ testId, connectorId, connectionId, institution, oauth
318
318
  institution,
319
319
  session?.token
320
320
  ]);
321
- // allowedListUrl & shouldRender ensure we are only rendering Quiltt, MX and Plaid content in Webview
321
+ // urlAllowList & shouldRender ensure we are only rendering Quiltt, MX and Plaid content in Webview
322
322
  // For other urls, we assume those are bank urls, which need to be handled in external browser.
323
- // TODO: Convert it to a list from Quiltt Server to prevent MX/ Plaid changes.
324
- const allowedListUrl = useMemo(()=>[
325
- 'quiltt.io',
326
- 'quiltt.app',
327
- 'quiltt.dev',
328
- 'moneydesktop.com',
329
- 'plaid.com',
330
- 'https://cdn.plaid.com/link',
331
- 'https://www.google.com/recaptcha',
332
- 'https://challenges.cloudflare.com',
333
- 'https://api.stripe.com',
334
- 'https://cdn.jsdelivr.net',
335
- 'https://auth0.com'
336
- ], []);
323
+ // TODO: Need to regroup on this and figure out a better way to handle a URL allow list
324
+ // const urlAllowList = useMemo(
325
+ // () => [
326
+ // 'quiltt.io',
327
+ // 'quiltt.app',
328
+ // 'quiltt.dev',
329
+ // 'moneydesktop.com',
330
+ // 'plaid.com',
331
+ // 'https://cdn.plaid.com/link',
332
+ // 'https://www.google.com/recaptcha',
333
+ // 'https://challenges.cloudflare.com',
334
+ // 'https://api.stripe.com',
335
+ // 'https://cdn.jsdelivr.net',
336
+ // 'https://auth0.com',
337
+ // ],
338
+ // []
339
+ // )
337
340
  const isQuilttEvent = useCallback((url)=>url.protocol === 'quilttconnector:', []);
338
341
  const shouldRender = useCallback((url)=>{
339
342
  if (isQuilttEvent(url)) return false;
340
- if (url.protocol !== 'https:') {
341
- return false;
342
- }
343
- return allowedListUrl.some((href)=>url.href.includes(href));
343
+ return url.protocol === 'https:';
344
344
  }, [
345
- allowedListUrl,
346
345
  isQuilttEvent
347
346
  ]);
348
347
  const clearLocalStorage = ()=>{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quiltt/react-native",
3
- "version": "3.6.8",
3
+ "version": "3.6.9",
4
4
  "description": "React Native components for Quiltt Connector",
5
5
  "homepage": "https://github.com/quiltt/quiltt-js/tree/main/packages/react-native#readme",
6
6
  "repository": {
@@ -27,8 +27,8 @@
27
27
  ],
28
28
  "dependencies": {
29
29
  "@honeybadger-io/core": "6.6.0",
30
- "@quiltt/core": "3.6.8",
31
- "@quiltt/react": "3.6.8"
30
+ "@quiltt/core": "3.6.9",
31
+ "@quiltt/react": "3.6.9"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@apollo/client": "3.9.9",
@@ -86,37 +86,34 @@ const QuilttConnector = ({
86
86
  webViewRef.current?.injectJavaScript(script)
87
87
  }, [connectionId, connectorId, institution, session?.token])
88
88
 
89
- // allowedListUrl & shouldRender ensure we are only rendering Quiltt, MX and Plaid content in Webview
89
+ // urlAllowList & shouldRender ensure we are only rendering Quiltt, MX and Plaid content in Webview
90
90
  // For other urls, we assume those are bank urls, which need to be handled in external browser.
91
- // TODO: Convert it to a list from Quiltt Server to prevent MX/ Plaid changes.
92
- const allowedListUrl = useMemo(
93
- () => [
94
- 'quiltt.io',
95
- 'quiltt.app',
96
- 'quiltt.dev',
97
- 'moneydesktop.com',
98
- 'plaid.com',
99
- 'https://cdn.plaid.com/link',
100
- 'https://www.google.com/recaptcha',
101
- 'https://challenges.cloudflare.com',
102
- 'https://api.stripe.com',
103
- 'https://cdn.jsdelivr.net',
104
- 'https://auth0.com',
105
- ],
106
- []
107
- )
91
+ // TODO: Need to regroup on this and figure out a better way to handle a URL allow list
92
+ // const urlAllowList = useMemo(
93
+ // () => [
94
+ // 'quiltt.io',
95
+ // 'quiltt.app',
96
+ // 'quiltt.dev',
97
+ // 'moneydesktop.com',
98
+ // 'plaid.com',
99
+ // 'https://cdn.plaid.com/link',
100
+ // 'https://www.google.com/recaptcha',
101
+ // 'https://challenges.cloudflare.com',
102
+ // 'https://api.stripe.com',
103
+ // 'https://cdn.jsdelivr.net',
104
+ // 'https://auth0.com',
105
+ // ],
106
+ // []
107
+ // )
108
108
 
109
109
  const isQuilttEvent = useCallback((url: URL) => url.protocol === 'quilttconnector:', [])
110
110
 
111
111
  const shouldRender = useCallback(
112
112
  (url: URL) => {
113
113
  if (isQuilttEvent(url)) return false
114
- if (url.protocol !== 'https:') {
115
- return false
116
- }
117
- return allowedListUrl.some((href) => url.href.includes(href))
114
+ return url.protocol === 'https:'
118
115
  },
119
- [allowedListUrl, isQuilttEvent]
116
+ [isQuilttEvent]
120
117
  )
121
118
 
122
119
  const clearLocalStorage = () => {
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '3.6.8'
2
+ export const version = '3.6.9'