From e140bab4a771889e2e116583407a305b254d4202 Mon Sep 17 00:00:00 2001 From: Philipp Walter Date: Thu, 7 Nov 2024 14:28:01 +0100 Subject: [PATCH] feat(ui): add total balance conversion --- src/components/ActivityHeader.tsx | 12 ++++++++---- src/components/BalanceHeader.tsx | 16 ++++++++++++---- src/screens/Activity/ActivitySavings.tsx | 5 +---- src/screens/Activity/ActivitySpending.tsx | 5 +---- src/utils/i18n/locales/en/wallet.json | 11 +---------- 5 files changed, 23 insertions(+), 26 deletions(-) diff --git a/src/components/ActivityHeader.tsx b/src/components/ActivityHeader.tsx index 5fbf0bb2a..8af58efc2 100644 --- a/src/components/ActivityHeader.tsx +++ b/src/components/ActivityHeader.tsx @@ -7,7 +7,6 @@ import { ViewStyle, } from 'react-native'; -import { Caption13Up } from '../styles/text'; import { EyeIcon } from '../styles/icons'; import Money from './Money'; import DetectSwipe from './DetectSwipe'; @@ -21,11 +20,9 @@ import { const ActivityHeader = ({ balance, - label, style, }: { balance: number; - label?: string; style?: StyleProp; }): ReactElement => { const dispatch = useAppDispatch(); @@ -40,7 +37,14 @@ const ActivityHeader = ({ return ( - {label} + { return ( - {pendingPaymentsBalance ? ( + + + {pendingPaymentsBalance !== 0 && ( { text: , pending: ( ), }} /> - ) : ( - {t('balance_total')} )} diff --git a/src/screens/Activity/ActivitySavings.tsx b/src/screens/Activity/ActivitySavings.tsx index 56de31bac..d6616268a 100644 --- a/src/screens/Activity/ActivitySavings.tsx +++ b/src/screens/Activity/ActivitySavings.tsx @@ -71,10 +71,7 @@ const ActivitySavings = ({ - + {balanceInTransferToSavings !== 0 && ( diff --git a/src/screens/Activity/ActivitySpending.tsx b/src/screens/Activity/ActivitySpending.tsx index 9ad4de665..69332e223 100644 --- a/src/screens/Activity/ActivitySpending.tsx +++ b/src/screens/Activity/ActivitySpending.tsx @@ -59,10 +59,7 @@ const ActivitySpending = ({ - + {balanceInTransferToSpending !== 0 && ( diff --git a/src/utils/i18n/locales/en/wallet.json b/src/utils/i18n/locales/en/wallet.json index ea003ba01..158d22c80 100644 --- a/src/utils/i18n/locales/en/wallet.json +++ b/src/utils/i18n/locales/en/wallet.json @@ -5,11 +5,8 @@ "receive": { "string": "Receive" }, - "balance_total": { - "string": "Total balance" - }, "balance_total_pending": { - "string": "Total balance ( pending)" + "string": " ( pending)" }, "create_wallet_error": { "string": "Please reopen the app and try again." @@ -380,12 +377,6 @@ "activity_transfer": { "string": "Transfer" }, - "activity_transfer_spending": { - "string": "Spending Balance" - }, - "activity_transfer_savings": { - "string": "Savings Balance" - }, "activity_transfer_savings_pending": { "string": "From Spending (±{duration})" },