diff --git a/src/components/buttons/Button.tsx b/src/components/buttons/Button.tsx index c033d6e7b..c8820fa6b 100644 --- a/src/components/buttons/Button.tsx +++ b/src/components/buttons/Button.tsx @@ -1,7 +1,6 @@ import React, { memo, ReactElement, useMemo } from 'react'; import { ActivityIndicator, - Platform, Pressable, PressableProps, StyleProp, @@ -33,7 +32,7 @@ const Button = ({ size = 'small', disabled = false, loading = false, - textStyle = {}, + textStyle, style, icon, ...props @@ -81,13 +80,8 @@ const Button = ({ ...(text && !icon && { maxWidth: '100%', textAlign: 'center' }), // on android text sometimes get shrinked. So if there is no icon, make sure it takes the full width ...(variant === 'primary' ? {} : { color: white80 }), ...(disabled && !icon && { color: white32 }), - ...Platform.select({ - android: { - lineHeight: size === 'small' ? 15 : 18, - }, - }), }; - }, [textStyle, text, icon, variant, disabled, size, white32, white80]); + }, [textStyle, text, icon, variant, disabled, white32, white80]); const textPressedStyles = useMemo(() => { return { @@ -106,14 +100,7 @@ const Button = ({ {({ pressed }) => { return ( <> - {icon && ( - - {icon} - {/* {React.cloneElement(icon, { - ...{ ...(disabled && { color: 'white32' }) }, - })} */} - - )} + {icon && {icon}} { + navigation.navigate('CreateWallet', { action: 'create', bip39Passphrase }); + }; + return ( @@ -70,8 +74,7 @@ const Passphrase = ({ onChangeText={setPassphrase} returnKeyType="done" autoCapitalize="none" - // @ts-ignore autoCompleteType -> autoComplete in newer version - autoCompleteType="off" + autoComplete="off" autoCorrect={false} placeholder={t('passphrase')} testID="PassphraseInput" @@ -84,9 +87,7 @@ const Passphrase = ({ text={t('create_new_wallet')} size="large" testID="CreateNewWallet" - onPress={(): void => { - navigation.navigate('Slideshow', { bip39Passphrase }); - }} + onPress={onCreateWallet} /> diff --git a/src/screens/Onboarding/RestoreFromSeed.tsx b/src/screens/Onboarding/RestoreFromSeed.tsx index 8be009a24..13591e5fd 100644 --- a/src/screens/Onboarding/RestoreFromSeed.tsx +++ b/src/screens/Onboarding/RestoreFromSeed.tsx @@ -223,7 +223,7 @@ const RestoreFromSeed = ({ value={bip39Passphrase} returnKeyType="done" autoCapitalize="none" - autoCompleteType="off" + autoComplete="off" autoCorrect={false} placeholder={t('restore_passphrase_placeholder')} testID="PassphraseInput" diff --git a/src/screens/Onboarding/Slideshow.tsx b/src/screens/Onboarding/Slideshow.tsx index 223b51a6c..9affc7e5f 100644 --- a/src/screens/Onboarding/Slideshow.tsx +++ b/src/screens/Onboarding/Slideshow.tsx @@ -183,7 +183,7 @@ const Slideshow = ({ } }; - const onCreateWallet = useCallback(async (): Promise => { + const onCreateWallet = useCallback((): void => { dispatch(updateUser({ requiresRemoteRestore: false })); navigation.navigate('CreateWallet', { action: 'create',