mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
* v4.23.0 release candidate * - Fix restoring zano from QR - Fix Zano confirmations count - Fix birdpay - Fix balance display * Fix Zano assets showing amount before they are added * - handle fetching token data while the API is busy - potential fix for duplicate transactions * fix receive confirmations, maybe * revert onChangeWallet cleanup * Fix confirmations not updating * improve zano wallet opening, fix CI commands and messages on slack (#1979) Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com> * Cache wallet when creating/restoring as well * - hardcode Trocador Maximum limit for Zano temporarily - Configure Cake Zano node to use SSL * reformatting [skip ci] * revert to non-ssl * update build numbers [skip ci] * disable zano for desktop [skip ci] --------- Co-authored-by: cyan <cyjan@mrcyjanek.net>
52 lines
1.3 KiB
Dart
52 lines
1.3 KiB
Dart
import 'package:cw_core/pending_transaction.dart';
|
|
import 'package:cw_zano/api/model/destination.dart';
|
|
import 'package:cw_zano/api/model/transfer_result.dart';
|
|
import 'package:cw_zano/zano_formatter.dart';
|
|
import 'package:cw_zano/zano_wallet.dart';
|
|
|
|
class PendingZanoTransaction with PendingTransaction {
|
|
PendingZanoTransaction({
|
|
required this.zanoWallet,
|
|
required this.destinations,
|
|
required this.fee,
|
|
required this.comment,
|
|
required this.assetId,
|
|
required this.ticker,
|
|
this.decimalPoint = ZanoFormatter.defaultDecimalPoint,
|
|
required this.amount,
|
|
});
|
|
|
|
final ZanoWalletBase zanoWallet;
|
|
final List<Destination> destinations;
|
|
final BigInt fee;
|
|
final String comment;
|
|
final String assetId;
|
|
final String ticker;
|
|
final int decimalPoint;
|
|
final BigInt amount;
|
|
|
|
@override
|
|
String get id => transferResult?.txHash ?? '';
|
|
|
|
@override
|
|
String get hex => '';
|
|
|
|
@override
|
|
String get amountFormatted => ZanoFormatter.bigIntAmountToString(amount, decimalPoint);
|
|
|
|
@override
|
|
String get feeFormatted => ZanoFormatter.bigIntAmountToString(fee);
|
|
|
|
TransferResult? transferResult;
|
|
|
|
@override
|
|
Future<void> commit() async {
|
|
await zanoWallet.transfer(destinations, fee, comment);
|
|
zanoWallet.fetchTransactions();
|
|
}
|
|
|
|
@override
|
|
Future<String?> commitUR() {
|
|
throw UnimplementedError();
|
|
}
|
|
}
|