From d8571b466e7fece8e25a1f052b3017e9c3267c13 Mon Sep 17 00:00:00 2001 From: Javier Bueno Date: Fri, 12 Apr 2024 00:26:44 +0100 Subject: [PATCH] fix(setup-wallet): dialogs and link --- .../CreateWallet/RecoveryPhraseScreen.tsx | 24 +++++++++++++++++-- .../CreateWallet/WalletDetailsScreen.tsx | 6 ++++- .../SelectWalletFromListScreen.tsx | 2 +- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/apps/wallet-mobile/src/features/SetupWallet/useCases/CreateWallet/RecoveryPhraseScreen.tsx b/apps/wallet-mobile/src/features/SetupWallet/useCases/CreateWallet/RecoveryPhraseScreen.tsx index 75ee9e1f47..ac952ec1a5 100644 --- a/apps/wallet-mobile/src/features/SetupWallet/useCases/CreateWallet/RecoveryPhraseScreen.tsx +++ b/apps/wallet-mobile/src/features/SetupWallet/useCases/CreateWallet/RecoveryPhraseScreen.tsx @@ -59,7 +59,7 @@ export const RecoveryPhraseScreen = () => { }, [track]), ) - const handleOnShowModal = () => { + const handleOnShowModal = React.useCallback(() => { openModal( strings.recoveryPhraseModalTitle, @@ -92,7 +92,27 @@ export const RecoveryPhraseScreen = () => { , HEIGHT_MODAL, ) - } + }, [ + HEIGHT_MODAL, + closeModal, + openModal, + strings.continueButton, + strings.recoveryPhraseCardFifthItem, + strings.recoveryPhraseCardFirstItem, + strings.recoveryPhraseCardFourthItem, + strings.recoveryPhraseCardSecondItem, + strings.recoveryPhraseCardThirdItem, + strings.recoveryPhraseCardTitle, + strings.recoveryPhraseModalTitle, + styles.button, + styles.content, + styles.modal, + ]) + + React.useEffect(() => { + handleOnShowModal() + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []) return ( diff --git a/apps/wallet-mobile/src/features/SetupWallet/useCases/CreateWallet/WalletDetailsScreen.tsx b/apps/wallet-mobile/src/features/SetupWallet/useCases/CreateWallet/WalletDetailsScreen.tsx index 613953ef2a..25af1bb3fe 100644 --- a/apps/wallet-mobile/src/features/SetupWallet/useCases/CreateWallet/WalletDetailsScreen.tsx +++ b/apps/wallet-mobile/src/features/SetupWallet/useCases/CreateWallet/WalletDetailsScreen.tsx @@ -130,7 +130,6 @@ export const WalletDetailsScreen = () => { }, [createWallet, mnemonic, name, networkId, password, track, walletImplementationId]) const showModalTipsPassword = () => { - Keyboard.dismiss() openModal( strings.walletDetailsModalTitle, @@ -168,6 +167,11 @@ export const WalletDetailsScreen = () => { ) } + React.useEffect(() => { + showModalTipsPassword() + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []) + const showModalTipsPlateNumber = () => { Keyboard.dismiss() openModal( diff --git a/apps/wallet-mobile/src/features/SetupWallet/useCases/SelectWalletFromList/SelectWalletFromListScreen.tsx b/apps/wallet-mobile/src/features/SetupWallet/useCases/SelectWalletFromList/SelectWalletFromListScreen.tsx index 19dfb1a4a8..c142205b4a 100644 --- a/apps/wallet-mobile/src/features/SetupWallet/useCases/SelectWalletFromList/SelectWalletFromListScreen.tsx +++ b/apps/wallet-mobile/src/features/SetupWallet/useCases/SelectWalletFromList/SelectWalletFromListScreen.tsx @@ -194,10 +194,10 @@ const useStyles = () => { backgroundColor: theme.color.primary[500], }, linkText: { + ...theme.typography['button-2-m'], color: theme.color.primary[500], }, link: { - ...theme.typography['button-2-m'], flexDirection: 'row', justifyContent: 'center', alignItems: 'center',