From c2287f2df61032c92cc7a4128ba77da0c0f2c0b3 Mon Sep 17 00:00:00 2001 From: Marcos Rodriguez Velez Date: Sun, 30 Jun 2024 11:18:37 -0400 Subject: [PATCH 001/123] Update Podfile.lock --- ios/Podfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 070946991..16fbd9b69 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -345,7 +345,7 @@ PODS: - React - react-native-randombytes (3.6.1): - React-Core - - react-native-safe-area-context (4.10.5): + - react-native-safe-area-context (4.10.7): - React-Core - react-native-secure-key-store (2.0.10): - React-Core @@ -809,7 +809,7 @@ SPEC CHECKSUMS: react-native-menu: d32728a357dfb360cf01cd5979cf7713c5acbb95 react-native-qrcode-local-image: 35ccb306e4265bc5545f813e54cc830b5d75bcfc react-native-randombytes: 421f1c7d48c0af8dbcd471b0324393ebf8fe7846 - react-native-safe-area-context: a240ad4b683349e48b1d51fed1611138d1bdad97 + react-native-safe-area-context: 422017db8bcabbada9ad607d010996c56713234c react-native-secure-key-store: 910e6df6bc33cb790aba6ee24bc7818df1fe5898 react-native-tcp-socket: ea937a61ee9ff2cb3cceade359290a46ad2b5aab React-NativeModulesApple: 3107f777453f953906d9ba9dc5f8cbd91a6ef913 From 2d663ac8e28dc84455486c5670e4af36e30f8492 Mon Sep 17 00:00:00 2001 From: Marcos Rodriguez Velez Date: Sun, 30 Jun 2024 13:17:55 -0400 Subject: [PATCH 002/123] REF: Replace abandoned package --- App.tsx | 14 +- android/build.gradle | 6 +- components/BottomModal.tsx | 125 ++++---- ios/Podfile.lock | 7 + package-lock.json | 57 ++-- package.json | 2 +- screen/lnd/ldkInfo.tsx | 6 +- screen/receive/details.js | 87 +++--- screen/send/SendDetails.tsx | 290 ++++++++++--------- screen/send/coinControl.js | 11 +- screen/wallets/ViewEditMultisigCosigners.tsx | 118 ++++---- screen/wallets/addMultisig.js | 143 ++++----- screen/wallets/addMultisigStep2.js | 152 +++++----- 13 files changed, 486 insertions(+), 532 deletions(-) diff --git a/App.tsx b/App.tsx index f549c7d02..0f1835c87 100644 --- a/App.tsx +++ b/App.tsx @@ -10,13 +10,25 @@ import { BlueDarkTheme, BlueDefaultTheme } from './components/themes'; import MasterView from './navigation/MasterView'; import { navigationRef } from './NavigationService'; import { StorageProvider } from './components/Context/StorageProvider'; +import { TrueSheet } from '@lodev09/react-native-true-sheet'; const App = () => { const colorScheme = useColorScheme(); + const onReady = () => { + // @ts-ignore: fix later + navigationRef.current?.addListener('beforeRemove', async (e: any) => { + if (e.data.action.type === 'NAVIGATE') { + e.preventDefault(); + await TrueSheet.dismiss('BottomModal'); + navigationRef.current?.dispatch(e.data.action); + } + }); + }; + return ( - + diff --git a/android/build.gradle b/android/build.gradle index e95c17143..4784039e9 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -5,8 +5,8 @@ buildscript { minSdkVersion = 24 supportLibVersion = "28.0.0" buildToolsVersion = "34.0.0" - compileSdkVersion = 33 - targetSdkVersion = 33 + compileSdkVersion = 34 + targetSdkVersion = 34 googlePlayServicesVersion = "16.+" googlePlayServicesIidVersion = "16.0.1" firebaseVersion = "17.3.4" @@ -63,7 +63,7 @@ subprojects { if (project.hasProperty("android")) { android { buildToolsVersion "34.0.0" - compileSdkVersion 33 + compileSdkVersion 34 defaultConfig { minSdkVersion 24 } diff --git a/components/BottomModal.tsx b/components/BottomModal.tsx index 57af993c7..ac8b5f143 100644 --- a/components/BottomModal.tsx +++ b/components/BottomModal.tsx @@ -1,83 +1,56 @@ -import React from 'react'; -import { Platform, StyleSheet, useWindowDimensions, View } from 'react-native'; -import Modal from 'react-native-modal'; +import React, { forwardRef, useImperativeHandle, useRef } from 'react'; +import { TrueSheet, TrueSheetProps } from '@lodev09/react-native-true-sheet'; -import { BlueSpacing10 } from '../BlueComponents'; -import loc from '../loc'; -import Button from './Button'; -import { useTheme } from './themes'; - -const styles = StyleSheet.create({ - root: { - justifyContent: 'flex-end', - margin: 0, - }, - hasDoneButton: { - padding: 16, - paddingBottom: 24, - }, -}); - -interface BottomModalProps { +interface BottomModalProps extends TrueSheetProps { children?: React.ReactNode; - onBackButtonPress?: () => void; - onBackdropPress?: () => void; - onClose: () => void; - windowHeight?: number; - windowWidth?: number; - doneButton?: boolean; - avoidKeyboard?: boolean; - allowBackdropPress?: boolean; - isVisible: boolean; - coverScreen?: boolean; + onClose?: () => void; + name?: string; + isGrabberVisible?: boolean; } -const BottomModal: React.FC = ({ - onBackButtonPress, - onBackdropPress, - onClose, - windowHeight, - windowWidth, - doneButton, - isVisible, - avoidKeyboard = false, - allowBackdropPress = true, - coverScreen = true, - ...props -}) => { - const { height: valueWindowHeight, width: valueWindowWidth } = useWindowDimensions(); - const handleBackButtonPress = onBackButtonPress ?? onClose; - const handleBackdropPress = allowBackdropPress ? onBackdropPress ?? onClose : undefined; - const { colors } = useTheme(); - const stylesHook = StyleSheet.create({ - hasDoneButton: { - backgroundColor: colors.elevated, - }, - }); +export interface BottomModalHandle { + present: () => Promise; + dismiss: () => Promise; +} - return ( - - {props.children} - {doneButton && ( - -