From 1d032d37901354d195e16c446a933b7086ea1474 Mon Sep 17 00:00:00 2001 From: banklesss <105349292+banklesss@users.noreply.github.com> Date: Tue, 17 Dec 2024 12:10:40 +0100 Subject: [PATCH] fix(wallet-mobile): error boundary copy action (#3764) --- apps/wallet-mobile/src/AppNavigator.tsx | 187 ++++++++++++------------ apps/wallet-mobile/src/YoroiApp.tsx | 77 +++++----- 2 files changed, 132 insertions(+), 132 deletions(-) diff --git a/apps/wallet-mobile/src/AppNavigator.tsx b/apps/wallet-mobile/src/AppNavigator.tsx index 74d91eca79..b8f09c03f2 100644 --- a/apps/wallet-mobile/src/AppNavigator.tsx +++ b/apps/wallet-mobile/src/AppNavigator.tsx @@ -10,7 +10,6 @@ import RNBootSplash from 'react-native-bootsplash' import SystemNavigationBar from 'react-native-system-navigation-bar' import StorybookScreen from '../.storybook' -import {ClipboardProvider} from './components/Clipboard/ClipboardProvider' import {ModalProvider} from './components/Modal/ModalContext' import {ModalScreen} from './components/Modal/ModalScreen' import {useAuth} from './features/Auth/AuthProvider' @@ -119,116 +118,114 @@ export const AppNavigator = () => { onReady={onReady} ref={navRef} > - - - - {/* Not Authenticated */} - - {isLoggedOut && ( + + + {/* Not Authenticated */} + + {isLoggedOut && ( + + {firstAction === 'first-run' && ( + + {() => ( + + + + )} + + )} + + {firstAction === 'show-agreement-changed-notice' && ( + {() => } + )} + + {firstAction === 'auth-with-pin' && ( + + )} + + {firstAction === 'auth-with-os' && ( + + )} + + {firstAction === 'request-new-pin' && ( + + )} + + )} + + {/* Authenticated */} + + {isLoggedIn && ( + <> - {firstAction === 'first-run' && ( - - {() => ( - - - - )} - - )} - - {firstAction === 'show-agreement-changed-notice' && ( - {() => } - )} - - {firstAction === 'auth-with-pin' && ( - )} - {firstAction === 'auth-with-os' && ( - + {afterLoginAction === 'dark-theme-announcement' && ( + )} - {firstAction === 'request-new-pin' && ( + {afterLoginAction === 'setup-wallet' && ( )} + + {afterLoginAction === 'manage-wallets' && ( + WalletNavigator} /> + )} - )} - - {/* Authenticated */} - - {isLoggedIn && ( - <> - - {afterLoginAction === 'choose-biometric-login' && ( - - )} - {afterLoginAction === 'dark-theme-announcement' && ( - - )} + + + + + )} - {afterLoginAction === 'setup-wallet' && ( - - )} + {/* Development */} - {afterLoginAction === 'manage-wallets' && ( - WalletNavigator} /> - )} - - - - - - - )} - - {/* Development */} - - {__DEV__ && ( - - + {__DEV__ && ( + + - + - + - - - )} - - - + + + )} + + ) } diff --git a/apps/wallet-mobile/src/YoroiApp.tsx b/apps/wallet-mobile/src/YoroiApp.tsx index 14b3c6de32..6bebd5f46a 100644 --- a/apps/wallet-mobile/src/YoroiApp.tsx +++ b/apps/wallet-mobile/src/YoroiApp.tsx @@ -13,6 +13,7 @@ import {enableScreens} from 'react-native-screens' import {QueryClientProvider} from 'react-query' import {LoadingBoundary} from './components/Boundary/Boundary' +import {ClipboardProvider} from './components/Clipboard/ClipboardProvider' import {ErrorBoundary} from './components/ErrorBoundary/ErrorBoundary' import {AuthProvider} from './features/Auth/AuthProvider' import {BrowserProvider} from './features/Discover/common/BrowserProvider' @@ -57,43 +58,45 @@ const Yoroi = () => { return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + )