From 0ee0b96247798f4873e413fd31efd8fcedae67c9 Mon Sep 17 00:00:00 2001 From: Serhii Date: Wed, 8 May 2024 16:53:39 +0300 Subject: [PATCH] Update transactions_page.dart --- .../dashboard/pages/transactions_page.dart | 38 +++++++++++-------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/lib/src/screens/dashboard/pages/transactions_page.dart b/lib/src/screens/dashboard/pages/transactions_page.dart index a4082a88b..fc0b6175c 100644 --- a/lib/src/screens/dashboard/pages/transactions_page.dart +++ b/lib/src/screens/dashboard/pages/transactions_page.dart @@ -89,22 +89,28 @@ class TransactionsPage extends StatelessWidget { final transaction = item.transaction; - final historicalFiatValue = dashboardViewModel.getFormattedFiatAmount(transaction); - final formattedFiatValue = historicalFiatValue ?? - item.formattedFiatAmount; - - return Observer( - builder: (_) => TransactionRow( - onTap: () => Navigator.of(context) - .pushNamed(Routes.transactionDetails, arguments: transaction), - direction: transaction.direction, - formattedDate: DateFormat('HH:mm').format(transaction.date), - formattedAmount: item.formattedCryptoAmount, - formattedFiatAmount: dashboardViewModel.balanceViewModel.isFiatDisabled ? '' : formattedFiatValue, - isPending: transaction.isPending, - isHistoricalRate: dashboardViewModel.settingsStore.showHistoricalFiatAmount && - historicalFiatValue !=null && historicalFiatValue.isNotEmpty, - title: item.formattedTitle + item.formattedStatus)); + return Observer(builder: (_) { + final historicalFiatValue = + dashboardViewModel.getFormattedFiatAmount(transaction); + final formattedFiatValue = + historicalFiatValue ?? item.formattedFiatAmount; + return TransactionRow( + onTap: () => Navigator.of(context) + .pushNamed(Routes.transactionDetails, arguments: transaction), + direction: transaction.direction, + formattedDate: DateFormat('HH:mm').format(transaction.date), + formattedAmount: item.formattedCryptoAmount, + formattedFiatAmount: + dashboardViewModel.balanceViewModel.isFiatDisabled + ? '' + : formattedFiatValue, + isPending: transaction.isPending, + isHistoricalRate: + dashboardViewModel.settingsStore.showHistoricalFiatAmount && + historicalFiatValue != null && + historicalFiatValue.isNotEmpty, + title: item.formattedTitle + item.formattedStatus); + }); } if (item is AnonpayTransactionListItem) {