mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-26 21:39:21 +00:00
51 lines
1.3 KiB
Dart
51 lines
1.3 KiB
Dart
import 'dart:async';
|
|
|
|
import '../../crypto_currency/intermediate/cryptonote_currency.dart';
|
|
import '../../models/tx_data.dart';
|
|
import '../wallet.dart';
|
|
import '../wallet_mixin_interfaces/mnemonic_interface.dart';
|
|
|
|
abstract class CryptonoteWallet<T extends CryptonoteCurrency> extends Wallet<T>
|
|
with MnemonicInterface<T> {
|
|
CryptonoteWallet(super.currency);
|
|
|
|
Completer<void>? walletOpenCompleter;
|
|
|
|
void resetWalletOpenCompleter() {
|
|
if (walletOpenCompleter == null || walletOpenCompleter!.isCompleted) {
|
|
walletOpenCompleter = Completer<void>();
|
|
}
|
|
}
|
|
|
|
Future<void> waitForWalletOpen() async {
|
|
if (walletOpenCompleter != null && !walletOpenCompleter!.isCompleted) {
|
|
await walletOpenCompleter!.future;
|
|
}
|
|
}
|
|
|
|
// ========== Overrides ======================================================
|
|
|
|
@override
|
|
Future<TxData> confirmSend({required TxData txData}) {
|
|
// TODO: implement confirmSend
|
|
throw UnimplementedError();
|
|
}
|
|
|
|
@override
|
|
Future<TxData> prepareSend({required TxData txData}) {
|
|
// TODO: implement prepareSend
|
|
throw UnimplementedError();
|
|
}
|
|
|
|
@override
|
|
Future<void> recover({required bool isRescan}) {
|
|
// TODO: implement recover
|
|
throw UnimplementedError();
|
|
}
|
|
|
|
@override
|
|
Future<bool> updateUTXOs() async {
|
|
// do nothing for now
|
|
return false;
|
|
}
|
|
}
|