Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions src/components/buttons/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { memo, ReactElement, useMemo } from 'react';
import {
ActivityIndicator,
Platform,
Pressable,
PressableProps,
StyleProp,
Expand Down Expand Up @@ -33,7 +32,7 @@ const Button = ({
size = 'small',
disabled = false,
loading = false,
textStyle = {},
textStyle,
style,
icon,
...props
Expand Down Expand Up @@ -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 {
Expand All @@ -106,14 +100,7 @@ const Button = ({
{({ pressed }) => {
return (
<>
{icon && (
<View color="transparent">
{icon}
{/* {React.cloneElement(icon, {
...{ ...(disabled && { color: 'white32' }) },
})} */}
</View>
)}
{icon && <View color="transparent">{icon}</View>}

<Text
style={[textStyles, pressed && textPressedStyles]}
Expand Down
2 changes: 1 addition & 1 deletion src/components/widgets/WeatherWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const styles = StyleSheet.create({
},
android: {
fontSize: 85,
lineHeight: 85,
lineHeight: 70,
},
}),
},
Expand Down
11 changes: 6 additions & 5 deletions src/screens/Onboarding/Passphrase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ const Passphrase = ({
[dimensions.width, isSmallScreen],
);

const onCreateWallet = (): void => {
navigation.navigate('CreateWallet', { action: 'create', bip39Passphrase });
};

return (
<ThemedView style={styles.root}>
<KeyboardAvoidingView style={styles.content}>
Expand Down Expand Up @@ -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"
Expand All @@ -84,9 +87,7 @@ const Passphrase = ({
text={t('create_new_wallet')}
size="large"
testID="CreateNewWallet"
onPress={(): void => {
navigation.navigate('Slideshow', { bip39Passphrase });
}}
onPress={onCreateWallet}
/>
</View>
</ScrollView>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Onboarding/RestoreFromSeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Onboarding/Slideshow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ const Slideshow = ({
}
};

const onCreateWallet = useCallback(async (): Promise<void> => {
const onCreateWallet = useCallback((): void => {
dispatch(updateUser({ requiresRemoteRestore: false }));
navigation.navigate('CreateWallet', {
action: 'create',
Expand Down
Loading