mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-24 12:39:37 +00:00
34 lines
690 B
Dart
34 lines
690 B
Dart
|
|
||
|
|
||
|
import 'package:cw_core/pending_transaction.dart';
|
||
|
import 'package:web3dart/crypto.dart';
|
||
|
|
||
|
class PendingTronTransaction with PendingTransaction {
|
||
|
final Function sendTransaction;
|
||
|
final List<int> signedTransaction;
|
||
|
final String fee;
|
||
|
final String amount;
|
||
|
|
||
|
PendingTronTransaction({
|
||
|
required this.sendTransaction,
|
||
|
required this.signedTransaction,
|
||
|
required this.fee,
|
||
|
required this.amount,
|
||
|
});
|
||
|
|
||
|
@override
|
||
|
String get amountFormatted => amount;
|
||
|
|
||
|
@override
|
||
|
Future<void> commit() async => await sendTransaction();
|
||
|
|
||
|
@override
|
||
|
String get feeFormatted => fee;
|
||
|
|
||
|
@override
|
||
|
String get hex => bytesToHex(signedTransaction);
|
||
|
|
||
|
@override
|
||
|
String get id => '';
|
||
|
}
|