Skip to content

Commit b0acd29

Browse files
authored
chore(deps): migrate react-native-webview to @interaxyz fork (#6466)
### Description Migrate `react-native-webview` to `@interaxyz` fork in order to get rid of the patch. The patch changes are implemented in the fork: react-native-webview/react-native-webview@master...mobilestack-xyz:react-native-webview:interaxyz-fork ### TODO Migrate back to the original package once react-native-webview/react-native-webview#3680 is released. ### Test plan * CI * Tested manually on iOS device ### Related issues - Related to RET-1308 ### Backwards compatibility Y ### Network scalability NA
1 parent f9f42bb commit b0acd29

File tree

10 files changed

+19
-36
lines changed

10 files changed

+19
-36
lines changed

WALLET.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,6 @@ [email protected]
643643
644644
645645
646-
647646
$ bash scripts/key_placer.sh decrypt
648647
Processing encrypted files
649648
Encrypted files decrypted

ios/Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ PODS:
618618
- react-native-video/Video (6.6.4):
619619
- RCT-Folly (= 2021.07.22.00)
620620
- React-Core
621-
- react-native-webview (13.12.5):
621+
- react-native-webview (13.13.4):
622622
- RCT-Folly (= 2021.07.22.00)
623623
- React-Core
624624
- React-NativeModulesApple (0.72.15):
@@ -913,7 +913,7 @@ DEPENDENCIES:
913913
- react-native-simple-toast (from `../node_modules/react-native-simple-toast`)
914914
- react-native-splash-screen (from `../node_modules/react-native-splash-screen`)
915915
- react-native-video (from `../node_modules/react-native-video`)
916-
- react-native-webview (from `../node_modules/react-native-webview`)
916+
- "react-native-webview (from `../node_modules/@interaxyz/react-native-webview`)"
917917
- React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
918918
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
919919
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
@@ -1102,7 +1102,7 @@ EXTERNAL SOURCES:
11021102
react-native-video:
11031103
:path: "../node_modules/react-native-video"
11041104
react-native-webview:
1105-
:path: "../node_modules/react-native-webview"
1105+
:path: "../node_modules/@interaxyz/react-native-webview"
11061106
React-NativeModulesApple:
11071107
:path: "../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios"
11081108
React-perflogger:
@@ -1282,7 +1282,7 @@ SPEC CHECKSUMS:
12821282
react-native-simple-toast: f6316baf3870934e6e92cf48dbc9e330a5c8eb82
12831283
react-native-splash-screen: 95994222cc95c236bd3cdc59fe45ed5f27969594
12841284
react-native-video: 50cf661686af98a65bd40fe17b5fac54bdcf38e9
1285-
react-native-webview: e27ee34f9a3bd53e833d8837ae2b09e936f60f41
1285+
react-native-webview: f1607e3969e0be6ccb01dc504b866c193e688245
12861286
React-NativeModulesApple: e29c0ef4359dbb256738a05b39cc98627cf6c698
12871287
React-perflogger: 6acc671f527e69c0cd93b8e62821d33d3ddf25ca
12881288
React-RCTActionSheet: 569bb9db46d85565d14697e15ecf2166e035eb07

jest_setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jest.mock('react-native/Libraries/Animated/components/AnimatedView.js', () => ({
2727
jest.mock('react-native/Libraries/Animated/components/AnimatedScrollView.js', () => ({
2828
default: 'RCTScrollView',
2929
}))
30-
jest.mock('react-native-webview', () => {
30+
jest.mock('@interaxyz/react-native-webview', () => {
3131
const { View } = require('react-native')
3232
return {
3333
default: View,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
"@fiatconnect/fiatconnect-sdk": "^0.5.66",
7777
"@fiatconnect/fiatconnect-types": "^13.3.10",
7878
"@gorhom/bottom-sheet": "^5.0.6",
79+
"@interaxyz/react-native-webview": "^13.13.4",
7980
"@json-rpc-tools/utils": "^1.7.6",
8081
"@noble/secp256k1": "^1.7.1",
8182
"@react-native-async-storage/async-storage": "^2.1.0",
@@ -173,7 +174,6 @@
173174
"react-native-svg": "^15.7.1",
174175
"react-native-url-polyfill": "^2.0.0",
175176
"react-native-video": "^6.6.4",
176-
"react-native-webview": "^13.12.5",
177177
"react-redux": "^9.2.0",
178178
"redux": "^5.0.1",
179179
"redux-persist": "^6.0.0",

patches/react-native-webview+13.12.5.patch

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/components/WebView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import { WebView as RNWebView, WebViewProps } from '@interaxyz/react-native-webview'
2+
import { WebViewErrorEvent } from '@interaxyz/react-native-webview/lib/WebViewTypes'
13
import React from 'react'
24
import { Platform, StyleSheet } from 'react-native'
3-
import { WebView as RNWebView, WebViewProps } from 'react-native-webview'
4-
import { WebViewErrorEvent } from 'react-native-webview/lib/WebViewTypes'
55
import Logger from 'src/utils/Logger'
66

77
export type WebViewRef = RNWebView

src/fiatExchanges/BidaliScreen.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { WebView } from '@interaxyz/react-native-webview'
12
import { render } from '@testing-library/react-native'
23
import * as React from 'react'
3-
import { WebView } from 'react-native-webview'
44
import { Provider } from 'react-redux'
55
import BidaliScreen from 'src/fiatExchanges/BidaliScreen'
66
import { Screens } from 'src/navigator/Screens'

src/fiatExchanges/BidaliScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import { WebViewMessageEvent } from '@interaxyz/react-native-webview'
12
import { NativeStackScreenProps } from '@react-navigation/native-stack'
23
import React, { useEffect, useMemo, useRef, useState } from 'react'
34
import { ActivityIndicator, StyleSheet } from 'react-native'
45
import { SafeAreaView } from 'react-native-safe-area-context'
5-
import { WebViewMessageEvent } from 'react-native-webview'
66
import { createSelector } from 'reselect'
77
import { e164NumberSelector } from 'src/account/selectors'
88
import { openUrl } from 'src/app/actions'

src/webview/WebViewScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { ShouldStartLoadRequest } from '@interaxyz/react-native-webview/lib/WebViewTypes'
12
import { useHeaderHeight } from '@react-navigation/elements'
23
import { NativeStackScreenProps } from '@react-navigation/native-stack'
34
import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react'
@@ -11,7 +12,6 @@ import {
1112
View,
1213
} from 'react-native'
1314
import { SafeAreaView } from 'react-native-safe-area-context'
14-
import { ShouldStartLoadRequest } from 'react-native-webview/lib/WebViewTypes'
1515
import AppAnalytics from 'src/analytics/AppAnalytics'
1616
import { DappExplorerEvents, WebViewEvents } from 'src/analytics/Events'
1717
import { openDeepLink } from 'src/app/actions'

yarn.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1661,6 +1661,14 @@
16611661
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45"
16621662
integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==
16631663

1664+
"@interaxyz/react-native-webview@^13.13.4":
1665+
version "13.13.4"
1666+
resolved "https://registry.yarnpkg.com/@interaxyz/react-native-webview/-/react-native-webview-13.13.4.tgz#a0528e4515e305edd3395e286b19c335ec08a90d"
1667+
integrity sha512-/TdnLQGbQ7ajYTc7KaTJ0DKPlmdIEv23IGdFpdsAf5A3nyGjsFelTapyMttRsKyqpsS6DRdUHwrUvZScaiFGIw==
1668+
dependencies:
1669+
escape-string-regexp "^4.0.0"
1670+
invariant "2.2.4"
1671+
16641672
"@isaacs/cliui@^8.0.2":
16651673
version "8.0.2"
16661674
resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550"
@@ -12860,14 +12868,6 @@ react-native-video@^6.6.4:
1286012868
resolved "https://registry.yarnpkg.com/react-native-video/-/react-native-video-6.6.4.tgz#77630a7b20b93a12ebc83244e9171ea5f0da52fd"
1286112869
integrity sha512-YBaStWAhWZMDaRG7Q9u173Si7ho7I3xwrS1SCKnProeXfdaS7vZNbt84ueFwufa4YxZ0JZoyOypH0tA0JZK3GQ==
1286212870

12863-
react-native-webview@^13.12.5:
12864-
version "13.12.5"
12865-
resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-13.12.5.tgz#ed9eec1eda234d7cf18d329859b9bdebf7e258b6"
12866-
integrity sha512-INOKPom4dFyzkbxbkuQNfeRG9/iYnyRDzrDkJeyvSWgJAW2IDdJkWFJBS2v0RxIL4gqLgHkiIZDOfiLaNnw83Q==
12867-
dependencies:
12868-
escape-string-regexp "^4.0.0"
12869-
invariant "2.2.4"
12870-
1287112871
1287212872
version "0.72.15"
1287312873
resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.72.15.tgz#9b74b0c39ec42befb70d494b535f863c4229ef55"

0 commit comments

Comments
 (0)