mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-10 12:54:38 +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 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) {
|
||||||
|
|
Loading…
Reference in a new issue