cake_wallet/lib/nano/cw_nano.dart

106 lines
2.8 KiB
Dart
Raw Normal View History

2023-07-24 18:09:28 +00:00
part of 'nano.dart';
2023-07-24 20:23:09 +00:00
// class CWMoneroAccountList extends MoneroAccountList {
// CWMoneroAccountList(this._wallet);
// final Object _wallet;
// @override
// @computed
// ObservableList<Account> get accounts {
// final moneroWallet = _wallet as MoneroWallet;
// final accounts = moneroWallet.walletAddresses.accountList
// .accounts
// .map((acc) => Account(id: acc.id, label: acc.label, balance: acc.balance))
// .toList();
// return ObservableList<Account>.of(accounts);
// }
// @override
// void update(Object wallet) {
// final moneroWallet = wallet as MoneroWallet;
// moneroWallet.walletAddresses.accountList.update();
// }
// @override
// void refresh(Object wallet) {
// final moneroWallet = wallet as MoneroWallet;
// moneroWallet.walletAddresses.accountList.refresh();
// }
// @override
// List<Account> getAll(Object wallet) {
// final moneroWallet = wallet as MoneroWallet;
// return moneroWallet.walletAddresses.accountList
// .getAll()
// .map((acc) => Account(id: acc.id, label: acc.label, balance: acc.balance))
// .toList();
// }
// @override
// Future<void> addAccount(Object wallet, {required String label}) async {
// final moneroWallet = wallet as MoneroWallet;
// await moneroWallet.walletAddresses.accountList.addAccount(label: label);
// }
// @override
// Future<void> setLabelAccount(Object wallet, {required int accountIndex, required String label}) async {
// final moneroWallet = wallet as MoneroWallet;
// await moneroWallet.walletAddresses.accountList
// .setLabelAccount(
// accountIndex: accountIndex,
// label: label);
// }
// }
2023-07-24 18:09:28 +00:00
2023-07-24 20:23:09 +00:00
class CWNano extends Nano {
2023-07-24 18:09:28 +00:00
2023-07-24 20:23:09 +00:00
// @override
// NanoAccountList getAccountList(Object wallet) {
// return CWNanoAccountList(wallet);
// }
2023-07-24 18:09:28 +00:00
@override
2023-07-24 20:23:09 +00:00
List<String> getNanoWordList(String language) {
throw UnimplementedError();
}
2023-07-24 18:09:28 +00:00
@override
2023-07-24 20:23:09 +00:00
WalletService createNanoWalletService(Box<WalletInfo> walletInfoSource) {
return NanoWalletService(walletInfoSource);
2023-07-24 18:09:28 +00:00
}
2023-07-24 20:23:09 +00:00
// @override
// WalletCredentials createNanoNewWalletCredentials({
// required String name,
// WalletInfo? walletInfo,
// }) =>
// NanoNewWalletCredentials(name: name, walletInfo: walletInfo);
2023-07-24 18:09:28 +00:00
@override
2023-07-24 20:23:09 +00:00
WalletCredentials createNanoNewWalletCredentials({
required String name,
required String language,
String? password,
}) {
return NanoNewWalletCredentials(name: name, password: password, language: language);
2023-07-24 18:09:28 +00:00
}
@override
2023-07-24 20:23:09 +00:00
TransactionHistoryBase getTransactionHistory(Object wallet) {
// final moneroWallet = wallet as MoneroWallet;
// return moneroWallet.transactionHistory;
throw UnimplementedError();
2023-07-24 18:09:28 +00:00
}
@override
2023-07-24 20:23:09 +00:00
void onStartup() {
// monero_wallet_api.onStartup();
2023-07-24 18:09:28 +00:00
}
@override
2023-07-24 20:23:09 +00:00
List<String> getMoneroWordList(String language) {
throw UnimplementedError();
2023-07-24 18:09:28 +00:00
}
}