From 5825a9991d126a0a9cdba4fd1f11eccffcb4d2cc Mon Sep 17 00:00:00 2001 From: Alex Bakoushin Date: Fri, 31 Jan 2025 16:22:02 +0100 Subject: [PATCH] switch to fork --- package.json | 2 +- ...+react-navigation-bottom-sheet+0.3.2.patch | 33 ------------------- src/dapps/DappShortcutTransactionRequest.tsx | 2 +- .../FiatExchangeCurrencyBottomSheet.tsx | 2 +- src/navigator/Navigator.tsx | 2 +- .../screens/WalletConnectRequest.tsx | 2 +- yarn.lock | 10 +++--- 7 files changed, 10 insertions(+), 43 deletions(-) delete mode 100644 patches/@th3rdwave+react-navigation-bottom-sheet+0.3.2.patch diff --git a/package.json b/package.json index cb2b82f7030..43b8efdcee0 100644 --- a/package.json +++ b/package.json @@ -76,6 +76,7 @@ "@fiatconnect/fiatconnect-sdk": "^0.5.66", "@fiatconnect/fiatconnect-types": "^13.3.10", "@gorhom/bottom-sheet": "^5.0.6", + "@interaxyz/react-navigation-bottom-sheet": "^0.3.2", "@json-rpc-tools/utils": "^1.7.6", "@noble/secp256k1": "^1.7.1", "@react-native-async-storage/async-storage": "^2.1.0", @@ -106,7 +107,6 @@ "@segment/analytics-react-native-plugin-firebase": "^0.4.3", "@segment/sovran-react-native": "^1.1.3", "@sentry/react-native": "^5.36.0", - "@th3rdwave/react-navigation-bottom-sheet": "^0.3.2", "@toruslabs/constants": "^14.2.0", "@toruslabs/fetch-node-details": "^14.2.0", "@toruslabs/torus.js": "^15.1.1", diff --git a/patches/@th3rdwave+react-navigation-bottom-sheet+0.3.2.patch b/patches/@th3rdwave+react-navigation-bottom-sheet+0.3.2.patch deleted file mode 100644 index 5617fb0b298..00000000000 --- a/patches/@th3rdwave+react-navigation-bottom-sheet+0.3.2.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/node_modules/@th3rdwave/react-navigation-bottom-sheet/src/BottomSheetView.tsx b/node_modules/@th3rdwave/react-navigation-bottom-sheet/src/BottomSheetView.tsx -index cc6f6c9..a92150a 100644 ---- a/node_modules/@th3rdwave/react-navigation-bottom-sheet/src/BottomSheetView.tsx -+++ b/node_modules/@th3rdwave/react-navigation-bottom-sheet/src/BottomSheetView.tsx -@@ -1,8 +1,7 @@ - import { - BottomSheetModal, - BottomSheetModalProps, -- BottomSheetModalProvider, -- BottomSheetView as RNBottomSheetView, -+ BottomSheetModalProvider - } from '@gorhom/bottom-sheet'; - import { ParamListBase, useTheme } from '@react-navigation/native'; - import * as React from 'react'; -@@ -90,11 +89,13 @@ function BottomSheetModalScreen({ - onDismiss={onDismiss} - {...props} - > -- {enableDynamicSizing ? ( -- {children as React.ReactNode} -- ) : ( -- children -- )} -+ {/** -+ * Patch which makes sure children is not wrapped by BottomSheetView -+ * when enableDynamicSizing is enabled, so we can use Gorhom components -+ * like BottomSheetScrollView in the screen. -+ * Otherwise it renders blank (conflicting with the dynamic sizing logic). -+ */} -+ {children} - - ); - } diff --git a/src/dapps/DappShortcutTransactionRequest.tsx b/src/dapps/DappShortcutTransactionRequest.tsx index f6d5e42fdf8..8644830e363 100644 --- a/src/dapps/DappShortcutTransactionRequest.tsx +++ b/src/dapps/DappShortcutTransactionRequest.tsx @@ -1,4 +1,4 @@ -import { BottomSheetScreenProps } from '@th3rdwave/react-navigation-bottom-sheet' +import { BottomSheetScreenProps } from '@interaxyz/react-navigation-bottom-sheet' import React, { useEffect } from 'react' import { useAsync } from 'react-async-hook' import { useTranslation } from 'react-i18next' diff --git a/src/fiatExchanges/FiatExchangeCurrencyBottomSheet.tsx b/src/fiatExchanges/FiatExchangeCurrencyBottomSheet.tsx index 9c0eb3cd8ac..ec77b884829 100644 --- a/src/fiatExchanges/FiatExchangeCurrencyBottomSheet.tsx +++ b/src/fiatExchanges/FiatExchangeCurrencyBottomSheet.tsx @@ -1,4 +1,4 @@ -import { BottomSheetScreenProps } from '@th3rdwave/react-navigation-bottom-sheet' +import { BottomSheetScreenProps } from '@interaxyz/react-navigation-bottom-sheet' import React, { useEffect, useMemo } from 'react' import { useTranslation } from 'react-i18next' import { FilterChip } from 'src/components/FilterChipsCarousel' diff --git a/src/navigator/Navigator.tsx b/src/navigator/Navigator.tsx index a7ae1ac25f5..60302f30d7d 100644 --- a/src/navigator/Navigator.tsx +++ b/src/navigator/Navigator.tsx @@ -1,9 +1,9 @@ import { BottomSheetBackdrop, BottomSheetBackdropProps } from '@gorhom/bottom-sheet' +import { createBottomSheetNavigator } from '@interaxyz/react-navigation-bottom-sheet' import { NativeStackNavigationOptions, createNativeStackNavigator, } from '@react-navigation/native-stack' -import { createBottomSheetNavigator } from '@th3rdwave/react-navigation-bottom-sheet' import * as React from 'react' import { Platform } from 'react-native' import SplashScreen from 'react-native-splash-screen' diff --git a/src/walletConnect/screens/WalletConnectRequest.tsx b/src/walletConnect/screens/WalletConnectRequest.tsx index 319a89fc476..b47e67ac606 100644 --- a/src/walletConnect/screens/WalletConnectRequest.tsx +++ b/src/walletConnect/screens/WalletConnectRequest.tsx @@ -1,4 +1,4 @@ -import { BottomSheetScreenProps } from '@th3rdwave/react-navigation-bottom-sheet' +import { BottomSheetScreenProps } from '@interaxyz/react-navigation-bottom-sheet' import React from 'react' import { useTranslation } from 'react-i18next' import { ActivityIndicator, StyleSheet, Text } from 'react-native' diff --git a/yarn.lock b/yarn.lock index 6d1ba9d578a..42e5db1b204 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1661,6 +1661,11 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== +"@interaxyz/react-navigation-bottom-sheet@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@interaxyz/react-navigation-bottom-sheet/-/react-navigation-bottom-sheet-0.3.2.tgz#e2ed37e5c407647434053d79fd4b7241fc8cab69" + integrity sha512-8Q8A8GmqlMF4W0f+GL9+FBFRn2syNgL8ngJyA9V3uIQskAlr4bGe25iX+UB7ccksU8BpniRcNAD6gl0vq4CnBg== + "@isaacs/cliui@^8.0.2": version "8.0.2" resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" @@ -4294,11 +4299,6 @@ pretty-format "^29.7.0" redent "^3.0.0" -"@th3rdwave/react-navigation-bottom-sheet@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@th3rdwave/react-navigation-bottom-sheet/-/react-navigation-bottom-sheet-0.3.2.tgz#b7999322d54cb8f9a2b1b39e6c47f482407c5250" - integrity sha512-DEqC9tlAWE8qw5DDveyTwG0qjMJH3h8nup5Qi3TBlfW8hG9qx0N1/dfA1D+GKFEb4gw1C2/AWC6umc13z7ytoQ== - "@toruslabs/bs58@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@toruslabs/bs58/-/bs58-1.0.0.tgz#a5a9621caba9408521d7f17949b28f9af48f4f23"