Skip to content

Commit

Permalink
chore(deps): migrate react-native-webview to @interaxyz fork (#6466)
Browse files Browse the repository at this point in the history
### 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
  • Loading branch information
bakoushin authored Jan 31, 2025
1 parent f9f42bb commit b0acd29
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 36 deletions.
1 change: 0 additions & 1 deletion WALLET.md
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,6 @@ [email protected]
[email protected]
[email protected]
[email protected]
[email protected]
$ bash scripts/key_placer.sh decrypt
Processing encrypted files
Encrypted files decrypted
Expand Down
8 changes: 4 additions & 4 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ PODS:
- react-native-video/Video (6.6.4):
- RCT-Folly (= 2021.07.22.00)
- React-Core
- react-native-webview (13.12.5):
- react-native-webview (13.13.4):
- RCT-Folly (= 2021.07.22.00)
- React-Core
- React-NativeModulesApple (0.72.15):
Expand Down Expand Up @@ -913,7 +913,7 @@ DEPENDENCIES:
- react-native-simple-toast (from `../node_modules/react-native-simple-toast`)
- react-native-splash-screen (from `../node_modules/react-native-splash-screen`)
- react-native-video (from `../node_modules/react-native-video`)
- react-native-webview (from `../node_modules/react-native-webview`)
- "react-native-webview (from `../node_modules/@interaxyz/react-native-webview`)"
- React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
Expand Down Expand Up @@ -1102,7 +1102,7 @@ EXTERNAL SOURCES:
react-native-video:
:path: "../node_modules/react-native-video"
react-native-webview:
:path: "../node_modules/react-native-webview"
:path: "../node_modules/@interaxyz/react-native-webview"
React-NativeModulesApple:
:path: "../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios"
React-perflogger:
Expand Down Expand Up @@ -1282,7 +1282,7 @@ SPEC CHECKSUMS:
react-native-simple-toast: f6316baf3870934e6e92cf48dbc9e330a5c8eb82
react-native-splash-screen: 95994222cc95c236bd3cdc59fe45ed5f27969594
react-native-video: 50cf661686af98a65bd40fe17b5fac54bdcf38e9
react-native-webview: e27ee34f9a3bd53e833d8837ae2b09e936f60f41
react-native-webview: f1607e3969e0be6ccb01dc504b866c193e688245
React-NativeModulesApple: e29c0ef4359dbb256738a05b39cc98627cf6c698
React-perflogger: 6acc671f527e69c0cd93b8e62821d33d3ddf25ca
React-RCTActionSheet: 569bb9db46d85565d14697e15ecf2166e035eb07
Expand Down
2 changes: 1 addition & 1 deletion jest_setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jest.mock('react-native/Libraries/Animated/components/AnimatedView.js', () => ({
jest.mock('react-native/Libraries/Animated/components/AnimatedScrollView.js', () => ({
default: 'RCTScrollView',
}))
jest.mock('react-native-webview', () => {
jest.mock('@interaxyz/react-native-webview', () => {
const { View } = require('react-native')
return {
default: View,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"@fiatconnect/fiatconnect-sdk": "^0.5.66",
"@fiatconnect/fiatconnect-types": "^13.3.10",
"@gorhom/bottom-sheet": "^5.0.6",
"@interaxyz/react-native-webview": "^13.13.4",
"@json-rpc-tools/utils": "^1.7.6",
"@noble/secp256k1": "^1.7.1",
"@react-native-async-storage/async-storage": "^2.1.0",
Expand Down Expand Up @@ -173,7 +174,6 @@
"react-native-svg": "^15.7.1",
"react-native-url-polyfill": "^2.0.0",
"react-native-video": "^6.6.4",
"react-native-webview": "^13.12.5",
"react-redux": "^9.2.0",
"redux": "^5.0.1",
"redux-persist": "^6.0.0",
Expand Down
16 changes: 0 additions & 16 deletions patches/react-native-webview+13.12.5.patch

This file was deleted.

4 changes: 2 additions & 2 deletions src/components/WebView.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { WebView as RNWebView, WebViewProps } from '@interaxyz/react-native-webview'
import { WebViewErrorEvent } from '@interaxyz/react-native-webview/lib/WebViewTypes'
import React from 'react'
import { Platform, StyleSheet } from 'react-native'
import { WebView as RNWebView, WebViewProps } from 'react-native-webview'
import { WebViewErrorEvent } from 'react-native-webview/lib/WebViewTypes'
import Logger from 'src/utils/Logger'

export type WebViewRef = RNWebView
Expand Down
2 changes: 1 addition & 1 deletion src/fiatExchanges/BidaliScreen.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { WebView } from '@interaxyz/react-native-webview'
import { render } from '@testing-library/react-native'
import * as React from 'react'
import { WebView } from 'react-native-webview'
import { Provider } from 'react-redux'
import BidaliScreen from 'src/fiatExchanges/BidaliScreen'
import { Screens } from 'src/navigator/Screens'
Expand Down
2 changes: 1 addition & 1 deletion src/fiatExchanges/BidaliScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { WebViewMessageEvent } from '@interaxyz/react-native-webview'
import { NativeStackScreenProps } from '@react-navigation/native-stack'
import React, { useEffect, useMemo, useRef, useState } from 'react'
import { ActivityIndicator, StyleSheet } from 'react-native'
import { SafeAreaView } from 'react-native-safe-area-context'
import { WebViewMessageEvent } from 'react-native-webview'
import { createSelector } from 'reselect'
import { e164NumberSelector } from 'src/account/selectors'
import { openUrl } from 'src/app/actions'
Expand Down
2 changes: 1 addition & 1 deletion src/webview/WebViewScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ShouldStartLoadRequest } from '@interaxyz/react-native-webview/lib/WebViewTypes'
import { useHeaderHeight } from '@react-navigation/elements'
import { NativeStackScreenProps } from '@react-navigation/native-stack'
import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react'
Expand All @@ -11,7 +12,6 @@ import {
View,
} from 'react-native'
import { SafeAreaView } from 'react-native-safe-area-context'
import { ShouldStartLoadRequest } from 'react-native-webview/lib/WebViewTypes'
import AppAnalytics from 'src/analytics/AppAnalytics'
import { DappExplorerEvents, WebViewEvents } from 'src/analytics/Events'
import { openDeepLink } from 'src/app/actions'
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1661,6 +1661,14 @@
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45"
integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==

"@interaxyz/react-native-webview@^13.13.4":
version "13.13.4"
resolved "https://registry.yarnpkg.com/@interaxyz/react-native-webview/-/react-native-webview-13.13.4.tgz#a0528e4515e305edd3395e286b19c335ec08a90d"
integrity sha512-/TdnLQGbQ7ajYTc7KaTJ0DKPlmdIEv23IGdFpdsAf5A3nyGjsFelTapyMttRsKyqpsS6DRdUHwrUvZScaiFGIw==
dependencies:
escape-string-regexp "^4.0.0"
invariant "2.2.4"

"@isaacs/cliui@^8.0.2":
version "8.0.2"
resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550"
Expand Down Expand Up @@ -12860,14 +12868,6 @@ react-native-video@^6.6.4:
resolved "https://registry.yarnpkg.com/react-native-video/-/react-native-video-6.6.4.tgz#77630a7b20b93a12ebc83244e9171ea5f0da52fd"
integrity sha512-YBaStWAhWZMDaRG7Q9u173Si7ho7I3xwrS1SCKnProeXfdaS7vZNbt84ueFwufa4YxZ0JZoyOypH0tA0JZK3GQ==

react-native-webview@^13.12.5:
version "13.12.5"
resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-13.12.5.tgz#ed9eec1eda234d7cf18d329859b9bdebf7e258b6"
integrity sha512-INOKPom4dFyzkbxbkuQNfeRG9/iYnyRDzrDkJeyvSWgJAW2IDdJkWFJBS2v0RxIL4gqLgHkiIZDOfiLaNnw83Q==
dependencies:
escape-string-regexp "^4.0.0"
invariant "2.2.4"

[email protected]:
version "0.72.15"
resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.72.15.tgz#9b74b0c39ec42befb70d494b535f863c4229ef55"
Expand Down

0 comments on commit b0acd29

Please sign in to comment.