| 1 | import 'package:cw_core/amount/money.dart'; |
| 2 | import 'package:cw_core/format_amount.dart'; |
| 3 | import 'package:cw_core/transaction_direction.dart'; |
| 4 | import 'package:cw_core/keyable.dart'; |
| 5 | |
| 6 | abstract class TransactionInfo extends Object with Keyable { |
| 7 | late String id; |
| 8 | late String txHash = id; |
| 9 | late Money amount; |
| 10 | Money? fee; |
| 11 | late TransactionDirection direction; |
| 12 | late bool isPending; |
| 13 | late DateTime date; |
| 14 | int? height; |
| 15 | int confirmations = 0; |
| 16 | String? to; |
| 17 | String? from; |
| 18 | String? evmSignatureName; |
| 19 | bool? isReplaced; |
| 20 | List<String>? inputAddresses; |
| 21 | List<String>? outputAddresses; |
| 22 | |
| 23 | @override |
| 24 | dynamic get keyIndex => id; |
| 25 | |
| 26 | Map<String, dynamic> additionalInfo = {}; |
| 27 | |
| 28 | String? _fiatAmount; |
| 29 | String fiatAmount() => _fiatAmount ?? ''; |
| 30 | void changeFiatAmount(String amount) => _fiatAmount = formatAmount(amount); |
| 31 | } |