Skip to content

Commit 041d676

Browse files
authored
Merge pull request #2343 from synonymdev/feat/v51-design
fix: v51 minor design updates
2 parents 5e2b912 + 0c54f3a commit 041d676

File tree

8 files changed

+25
-43
lines changed

8 files changed

+25
-43
lines changed

src/screens/Transfer/Liquidity.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const Liquidity = ({
4242
<BodyM style={styles.description} color="secondary">
4343
{t('liquidity.text')}
4444
</BodyM>
45+
4546
<BodyMB style={styles.label}>{t('liquidity.label')}</BodyMB>
4647
<LightningChannel
4748
capacity={channelSize}
@@ -79,12 +80,12 @@ const styles = StyleSheet.create({
7980
marginTop: 4,
8081
},
8182
label: {
82-
marginTop: 32,
83+
marginTop: 'auto',
8384
marginBottom: 16,
8485
},
8586
buttonContainer: {
8687
flexDirection: 'row',
87-
marginTop: 'auto',
88+
marginTop: 32,
8889
},
8990
button: {
9091
flex: 1,

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/Receive/Liquidity.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@ const styles = StyleSheet.create({
7373
paddingHorizontal: 16,
7474
},
7575
label: {
76-
marginTop: 48,
76+
marginTop: 'auto',
7777
marginBottom: 16,
7878
},
7979
buttonContainer: {
8080
flexDirection: 'row',
8181
justifyContent: 'center',
82-
marginTop: 'auto',
8382
gap: 16,
83+
marginTop: 32,
8484
},
8585
button: {
8686
flex: 1,

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>

src/screens/Wallets/Send/ReviewAndSend.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ import {
4242
} from '../../../store/slices/metadata';
4343
import useColors from '../../../hooks/colors';
4444
import { useAppDispatch, useAppSelector } from '../../../hooks/redux';
45-
import { useDisplayValues } from '../../../hooks/displayValues';
4645
import { useLightningBalance } from '../../../hooks/lightning';
4746
import { EFeeId } from '../../../store/types/fees';
4847
import {
@@ -52,9 +51,9 @@ import {
5251
import { FeeText } from '../../../utils/fees';
5352
import { getFiatDisplayValues } from '../../../utils/displayValues';
5453
import { showToast } from '../../../utils/notifications';
55-
// import { refreshWallet } from '../../../utils/wallet';
5654
import type { SendScreenProps } from '../../../navigation/types';
5755
import SafeAreaInset from '../../../components/SafeAreaInset';
56+
import Money from '../../../components/Money';
5857
import Dialog from '../../../components/Dialog';
5958
import Biometrics from '../../../components/Biometrics';
6059
import Button from '../../../components/buttons/Button';
@@ -333,8 +332,6 @@ const ReviewAndSend = ({
333332
});
334333
}, [transaction.satsPerByte, transaction.message]);
335334

336-
const fiatTransactionFee = useDisplayValues(feeSats);
337-
338335
const runCreateTxMethods = useCallback((): void => {
339336
if (usesLightning) {
340337
createLightningTransaction().then();
@@ -609,11 +606,14 @@ const ReviewAndSend = ({
609606
value={
610607
<View style={styles.fee}>
611608
{feeIcon}
612-
<BodySSB>
613-
{t(`fee:${selectedFeeId}.title`)} (
614-
{fiatTransactionFee.fiatSymbol}
615-
{fiatTransactionFee.fiatFormatted})
616-
</BodySSB>
609+
<BodySSB>{t(`fee:${selectedFeeId}.title`)} (</BodySSB>
610+
<Money
611+
sats={feeSats}
612+
size="bodySSB"
613+
symbol={true}
614+
symbolColor="primary"
615+
/>
616+
<BodySSB>)</BodySSB>
617617
<PencilIcon height={12} width={22} />
618618
</View>
619619
}

src/utils/i18n/locales/en/lightning.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
"string": "Liquidity\n<accent>& routing</accent>"
147147
},
148148
"text": {
149-
"string": "Your spending balance in Bitkit is like your internet connection. Instead of bandwidth, you pay for liquidity and payment routing.\n\nPayments to and from your spending balance are cheaper, faster, and more private than regular Bitcoin transactions.\n\nThe network fee and service provider fee are one-time costs to set up your balance."
149+
"string": "Your Spending Balance uses the Lightning Network to make your payments cheaper, faster, and more private.\n\nThis works like internet access, but you pay for liquidity & routing instead of bandwidth.\n\nThis setup includes some one-time costs."
150150
},
151151
"label": {
152152
"string": "Spending Balance Liquidity"

src/utils/i18n/locales/en/wallet.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,10 +323,10 @@
323323
"string": "Increase Receiving Capacity"
324324
},
325325
"text": {
326-
"string": "Your spending balance in Bitkit is like your internet connection. Instead of bandwidth, you pay for liquidity and payment routing.\n\nPayments from your spending balance are cheaper, faster, and more private than regular Bitcoin transactions.\n\nThe network fee and service provider fee are one-time costs to set up your balance."
326+
"string": "Your Spending Balance uses the Lightning Network to make your payments cheaper, faster, and more private.\n\nThis works like internet access, but you pay for liquidity & routing instead of bandwidth.\n\nThis setup includes some one-time costs."
327327
},
328328
"text_additional": {
329-
"string": "Your spending balance in Bitkit is like your internet connection. Instead of bandwidth, you pay for liquidity and payment routing.\n\nPayments from your spending balance are cheaper, faster, and more private than regular Bitcoin transactions.\n\nBitkit needs to increase the receiving capacity of your spending balance to process this payment."
329+
"string": "Your Spending Balance uses the Lightning Network to make your payments cheaper, faster, and more private.\n\nThis works like internet access, but you pay for liquidity & routing instead of bandwidth.\n\nBitkit needs to increase the receiving capacity of your spending balance to process this payment."
330330
},
331331
"label": {
332332
"string": "Spending Balance Liquidity"

0 commit comments

Comments
 (0)