Skip to content

Commit b78d775

Browse files
committed
fix(send): remove max buttons, make max amount tappable
1 parent c106b2f commit b78d775

File tree

3 files changed

+8
-27
lines changed

3 files changed

+8
-27
lines changed

src/screens/Wallets/LNURLPay/Amount.tsx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ const LNURLAmount = ({
107107

108108
<View style={styles.numberPad} testID="SendAmountNumberPad">
109109
<View style={styles.actions}>
110-
<View>
110+
<TouchableOpacity onPress={onMaxAmount}>
111111
<Caption13Up style={styles.maxSendableText} color="secondary">
112112
{t('lnurl_p_max')}
113113
</Caption13Up>
@@ -120,18 +120,8 @@ const LNURLAmount = ({
120120
symbol={true}
121121
{...maxSendableProps}
122122
/>
123-
</View>
123+
</TouchableOpacity>
124124
<View style={styles.actionButtons}>
125-
<View style={styles.actionButtonContainer}>
126-
<TouchableOpacity
127-
style={styles.actionButton}
128-
color="white10"
129-
testID="SendNumberPadMax"
130-
onPress={onMaxAmount}>
131-
<Caption13Up color="brand">{t('send_max')}</Caption13Up>
132-
</TouchableOpacity>
133-
</View>
134-
135125
<View style={styles.actionButtonContainer}>
136126
<UnitButton
137127
style={styles.actionButton}

src/screens/Wallets/LNURLWithdraw/Amount.tsx

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import React, {
99
import { StyleSheet, View } from 'react-native';
1010
import { useTranslation } from 'react-i18next';
1111

12-
import { TouchableHighlight } from '../../../styles/components';
12+
import { TouchableOpacity } from '../../../styles/components';
1313
import { Caption13Up } from '../../../styles/text';
1414
import { IColors } from '../../../styles/colors';
1515
import GradientView from '../../../components/GradientView';
@@ -95,7 +95,7 @@ const Amount = ({
9595

9696
<View style={styles.numberPad} testID="SendAmountNumberPad">
9797
<View style={styles.actions}>
98-
<View>
98+
<TouchableOpacity onPress={onMaxAmount}>
9999
<Caption13Up style={styles.maxWithdrawableText} color="secondary">
100100
{t('lnurl_w_max')}
101101
</Caption13Up>
@@ -107,18 +107,8 @@ const Amount = ({
107107
symbol={true}
108108
{...maxWithdrawableProps}
109109
/>
110-
</View>
110+
</TouchableOpacity>
111111
<View style={styles.actionButtons}>
112-
<View style={styles.actionButtonContainer}>
113-
<TouchableHighlight
114-
style={styles.actionButton}
115-
color="white10"
116-
testID="SendNumberPadMax"
117-
onPress={onMaxAmount}>
118-
<Caption13Up color="brand">{t('send_max')}</Caption13Up>
119-
</TouchableHighlight>
120-
</View>
121-
122112
<View style={styles.actionButtonContainer}>
123113
<UnitButton
124114
style={styles.actionButton}

src/screens/Wallets/Send/Amount.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ import React, {
66
useState,
77
useEffect,
88
} from 'react';
9-
import { StyleSheet, View, TouchableOpacity } from 'react-native';
9+
import { StyleSheet, View } from 'react-native';
1010
import { useTranslation } from 'react-i18next';
1111
import { useFocusEffect, useRoute } from '@react-navigation/native';
1212

1313
import { Caption13Up } from '../../../styles/text';
1414
import { IColors } from '../../../styles/colors';
15+
import { TouchableOpacity } from '../../../styles/components';
1516
import GradientView from '../../../components/GradientView';
1617
import BottomSheetNavigationHeader from '../../../components/BottomSheetNavigationHeader';
1718
import SafeAreaInset from '../../../components/SafeAreaInset';
@@ -255,7 +256,7 @@ const Amount = ({ navigation }: SendScreenProps<'Amount'>): ReactElement => {
255256

256257
<View style={styles.numberPad} testID="SendAmountNumberPad">
257258
<View style={styles.actions}>
258-
<TouchableOpacity activeOpacity={0.7} onPress={onMaxAmount}>
259+
<TouchableOpacity onPress={onMaxAmount}>
259260
<Caption13Up style={styles.availableAmountText} color="secondary">
260261
{t('send_available')}
261262
</Caption13Up>

0 commit comments

Comments
 (0)