Update transactions_page.dart

This commit is contained in:
Serhii 2024-05-08 16:53:39 +03:00
parent d8c1e14020
commit 0ee0b96247

View file

@ -89,22 +89,28 @@ class TransactionsPage extends StatelessWidget {
final transaction = item.transaction; final transaction = item.transaction;
final historicalFiatValue = dashboardViewModel.getFormattedFiatAmount(transaction); return Observer(builder: (_) {
final formattedFiatValue = historicalFiatValue ?? final historicalFiatValue =
item.formattedFiatAmount; dashboardViewModel.getFormattedFiatAmount(transaction);
final formattedFiatValue =
return Observer( historicalFiatValue ?? item.formattedFiatAmount;
builder: (_) => TransactionRow( return TransactionRow(
onTap: () => Navigator.of(context) onTap: () => Navigator.of(context)
.pushNamed(Routes.transactionDetails, arguments: transaction), .pushNamed(Routes.transactionDetails, arguments: transaction),
direction: transaction.direction, direction: transaction.direction,
formattedDate: DateFormat('HH:mm').format(transaction.date), formattedDate: DateFormat('HH:mm').format(transaction.date),
formattedAmount: item.formattedCryptoAmount, formattedAmount: item.formattedCryptoAmount,
formattedFiatAmount: dashboardViewModel.balanceViewModel.isFiatDisabled ? '' : formattedFiatValue, formattedFiatAmount:
isPending: transaction.isPending, dashboardViewModel.balanceViewModel.isFiatDisabled
isHistoricalRate: dashboardViewModel.settingsStore.showHistoricalFiatAmount && ? ''
historicalFiatValue !=null && historicalFiatValue.isNotEmpty, : formattedFiatValue,
title: item.formattedTitle + item.formattedStatus)); isPending: transaction.isPending,
isHistoricalRate:
dashboardViewModel.settingsStore.showHistoricalFiatAmount &&
historicalFiatValue != null &&
historicalFiatValue.isNotEmpty,
title: item.formattedTitle + item.formattedStatus);
});
} }
if (item is AnonpayTransactionListItem) { if (item is AnonpayTransactionListItem) {