mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 19:49:22 +00:00
Update transactions_page.dart
This commit is contained in:
parent
d8c1e14020
commit
0ee0b96247
1 changed files with 22 additions and 16 deletions
|
@ -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(
|
||||
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,
|
||||
formattedFiatAmount:
|
||||
dashboardViewModel.balanceViewModel.isFiatDisabled
|
||||
? ''
|
||||
: formattedFiatValue,
|
||||
isPending: transaction.isPending,
|
||||
isHistoricalRate: dashboardViewModel.settingsStore.showHistoricalFiatAmount &&
|
||||
historicalFiatValue !=null && historicalFiatValue.isNotEmpty,
|
||||
title: item.formattedTitle + item.formattedStatus));
|
||||
isHistoricalRate:
|
||||
dashboardViewModel.settingsStore.showHistoricalFiatAmount &&
|
||||
historicalFiatValue != null &&
|
||||
historicalFiatValue.isNotEmpty,
|
||||
title: item.formattedTitle + item.formattedStatus);
|
||||
});
|
||||
}
|
||||
|
||||
if (item is AnonpayTransactionListItem) {
|
||||
|
|
Loading…
Reference in a new issue