mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 01:37:54 +00:00
51 lines
1.4 KiB
Dart
51 lines
1.4 KiB
Dart
import 'dart:async';
|
|
|
|
import 'package:stackwallet/wallets/crypto_currency/intermediate/cryptonote_currency.dart';
|
|
import 'package:stackwallet/wallets/models/tx_data.dart';
|
|
import 'package:stackwallet/wallets/wallet/wallet.dart';
|
|
import 'package:stackwallet/wallets/wallet/wallet_mixin_interfaces/mnemonic_interface.dart';
|
|
|
|
abstract class CryptonoteWallet<T extends CryptonoteCurrency> extends Wallet<T>
|
|
with MnemonicInterface<T> {
|
|
CryptonoteWallet(T currency) : 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;
|
|
}
|
|
}
|