mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-12 08:53:57 +01:00
* CW-498 Call updateTransactions on account change * CW-498 Code Cleanup * CW-498 Add Wallet Address to trade to match transactions to trades * CW-498 Fix containsAddress to include only addresses of account * Handle nullability for fromWalletAddress --------- Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
20 lines
676 B
Dart
20 lines
676 B
Dart
import 'package:cake_wallet/entities/balance_display_mode.dart';
|
|
import 'package:cake_wallet/exchange/trade.dart';
|
|
import 'package:cake_wallet/store/settings_store.dart';
|
|
import 'package:cake_wallet/view_model/dashboard/action_list_item.dart';
|
|
|
|
class TradeListItem extends ActionListItem {
|
|
TradeListItem({required this.trade, required this.settingsStore});
|
|
|
|
final Trade trade;
|
|
final SettingsStore settingsStore;
|
|
|
|
BalanceDisplayMode get displayMode => settingsStore.balanceDisplayMode;
|
|
|
|
String get tradeFormattedAmount =>
|
|
displayMode == BalanceDisplayMode.hiddenBalance ? '---' : trade.amountFormatted();
|
|
|
|
@override
|
|
DateTime get date => trade.createdAt!;
|
|
}
|