| 1 | import 'package:cw_core/amount/money.dart'; |
| 2 | import 'package:cw_core/pending_transaction.dart'; |
| 3 | |
| 4 | class DecredPendingTransaction with PendingTransaction { |
| 5 | DecredPendingTransaction({ |
| 6 | required this.txId, |
| 7 | required this.amount, |
| 8 | required this.fee, |
| 9 | required this.rawHex, |
| 10 | required this.send, |
| 11 | }); |
| 12 | |
| 13 | final Money amount; |
| 14 | final Money fee; |
| 15 | final String txId; |
| 16 | final String rawHex; |
| 17 | final Future<void> Function() send; |
| 18 | |
| 19 | @override |
| 20 | String get id => txId; |
| 21 | |
| 22 | @override |
| 23 | String get amountFormatted => amount.toString(); |
| 24 | |
| 25 | @override |
| 26 | String get hex => rawHex; |
| 27 | |
| 28 | @override |
| 29 | Future<void> commit() => send(); |
| 30 | |
| 31 | @override |
| 32 | Future<Map<String, String>> commitUR() => throw UnimplementedError(); |
| 33 | } |