dev
dart 30 lines 710 Bytes
Raw
1 import 'package:cw_core/amount/money.dart';
2
3 class PendingChange {
4 final String address;
5 final BigInt amount;
6
7 PendingChange(this.address, this.amount);
8 }
9
10 mixin PendingTransaction {
11 String get id;
12
13 Money get amount;
14 Money get fee;
15 Money? get additionalCost => null;
16
17 String get amountFormatted;
18 String get feeFormatted => fee.toStringWithSymbol(fractionalDigits: 8);
19 String get feeFormattedValue => fee.toStringWithPrecision(fractionalDigits: 8);
20 String? feeRate;
21 String get hex;
22 String? get evmTxHashFromRawHex => null;
23 int? get outputCount => null;
24 PendingChange? change;
25
26 bool shouldCommitUR() => false;
27
28 Future<void> commit();
29 Future<Map<String, String>> commitUR();
30 }