mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-03 09:19:22 +00:00
clean up unused code and mark old as deprecated
This commit is contained in:
parent
3bbed4ec63
commit
8acf84e222
17 changed files with 148 additions and 3193 deletions
|
@ -48,8 +48,7 @@ class DbVersionMigrator with WalletDB {
|
|||
case 0:
|
||||
await Hive.openBox<dynamic>(DB.boxNameAllWalletsData);
|
||||
await Hive.openBox<dynamic>(DB.boxNamePrefs);
|
||||
final walletsService =
|
||||
WalletsService(secureStorageInterface: secureStore);
|
||||
final walletsService = WalletsService();
|
||||
final nodeService = NodeService(secureStorageInterface: secureStore);
|
||||
final prefs = Prefs.instance;
|
||||
final walletInfoList = await walletsService.walletNames;
|
||||
|
@ -304,8 +303,7 @@ class DbVersionMigrator with WalletDB {
|
|||
case 8:
|
||||
// migrate
|
||||
await Hive.openBox<dynamic>(DB.boxNameAllWalletsData);
|
||||
final walletsService =
|
||||
WalletsService(secureStorageInterface: secureStore);
|
||||
final walletsService = WalletsService();
|
||||
final walletInfoList = await walletsService.walletNames;
|
||||
await MainDB.instance.initMainDB();
|
||||
for (final walletId in walletInfoList.keys) {
|
||||
|
@ -374,7 +372,7 @@ class DbVersionMigrator with WalletDB {
|
|||
Future<void> _v4(SecureStorageInterface secureStore) async {
|
||||
await Hive.openBox<dynamic>(DB.boxNameAllWalletsData);
|
||||
await Hive.openBox<dynamic>(DB.boxNamePrefs);
|
||||
final walletsService = WalletsService(secureStorageInterface: secureStore);
|
||||
final walletsService = WalletsService();
|
||||
final prefs = Prefs.instance;
|
||||
final walletInfoList = await walletsService.walletNames;
|
||||
await prefs.init();
|
||||
|
@ -487,7 +485,7 @@ class DbVersionMigrator with WalletDB {
|
|||
|
||||
Future<void> _v7(SecureStorageInterface secureStore) async {
|
||||
await Hive.openBox<dynamic>(DB.boxNameAllWalletsData);
|
||||
final walletsService = WalletsService(secureStorageInterface: secureStore);
|
||||
final walletsService = WalletsService();
|
||||
final walletInfoList = await walletsService.walletNames;
|
||||
await MainDB.instance.initMainDB();
|
||||
|
||||
|
@ -573,7 +571,7 @@ class DbVersionMigrator with WalletDB {
|
|||
Future<void> _v10(SecureStorageInterface secureStore) async {
|
||||
await Hive.openBox<dynamic>(DB.boxNameAllWalletsData);
|
||||
await Hive.openBox<dynamic>(DB.boxNamePrefs);
|
||||
final walletsService = WalletsService(secureStorageInterface: secureStore);
|
||||
final walletsService = WalletsService();
|
||||
final prefs = Prefs.instance;
|
||||
final walletInfoList = await walletsService.walletNames;
|
||||
await prefs.init();
|
||||
|
|
|
@ -11,26 +11,24 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_libmonero/monero/monero.dart';
|
||||
import 'package:flutter_libmonero/wownero/wownero.dart';
|
||||
import 'package:stackwallet/db/hive/db.dart';
|
||||
import 'package:stackwallet/db/isar/main_db.dart';
|
||||
import 'package:stackwallet/services/notifications_service.dart';
|
||||
import 'package:stackwallet/services/trade_sent_from_stack_service.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart';
|
||||
import 'package:stackwallet/utilities/logger.dart';
|
||||
import 'package:stackwallet/wallets/wallet/impl/epiccash_wallet.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
@Deprecated("Legacy support only. Do not use.")
|
||||
class WalletInfo {
|
||||
final Coin coin;
|
||||
final String walletId;
|
||||
final String name;
|
||||
|
||||
const WalletInfo(
|
||||
{required this.coin, required this.walletId, required this.name});
|
||||
@Deprecated("Legacy support only. Do not use.")
|
||||
const WalletInfo({
|
||||
required this.coin,
|
||||
required this.walletId,
|
||||
required this.name,
|
||||
});
|
||||
|
||||
@Deprecated("Legacy support only. Do not use.")
|
||||
factory WalletInfo.fromJson(Map<String, dynamic> jsonObject) {
|
||||
return WalletInfo(
|
||||
coin: Coin.values.byName(jsonObject["coin"] as String),
|
||||
|
@ -39,6 +37,7 @@ class WalletInfo {
|
|||
);
|
||||
}
|
||||
|
||||
@Deprecated("Legacy support only. Do not use.")
|
||||
Map<String, String> toMap() {
|
||||
return {
|
||||
"name": name,
|
||||
|
@ -47,78 +46,30 @@ class WalletInfo {
|
|||
};
|
||||
}
|
||||
|
||||
@Deprecated("Legacy support only. Do not use.")
|
||||
String toJsonString() {
|
||||
return jsonEncode(toMap());
|
||||
}
|
||||
|
||||
@override
|
||||
@Deprecated("Legacy support only. Do not use.")
|
||||
String toString() {
|
||||
return "WalletInfo: ${toJsonString()}";
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated("Legacy support only. Do not use.")
|
||||
class WalletsService extends ChangeNotifier {
|
||||
late final SecureStorageInterface _secureStore;
|
||||
|
||||
@Deprecated("Legacy support only. Do not use.")
|
||||
Future<Map<String, WalletInfo>>? _walletNames;
|
||||
@Deprecated("Legacy support only. Do not use.")
|
||||
Future<Map<String, WalletInfo>> get walletNames =>
|
||||
_walletNames ??= _fetchWalletNames();
|
||||
|
||||
WalletsService({
|
||||
required SecureStorageInterface secureStorageInterface,
|
||||
}) {
|
||||
_secureStore = secureStorageInterface;
|
||||
}
|
||||
|
||||
// Future<Coin> getWalletCryptoCurrency({required String walletName}) async {
|
||||
// final id = await getWalletId(walletName);
|
||||
// final currency = DB.instance.get<dynamic>(
|
||||
// boxName: DB.boxNameAllWalletsData, key: "${id}_cryptoCurrency");
|
||||
// return Coin.values.byName(currency as String);
|
||||
// }
|
||||
|
||||
Future<bool> renameWallet({
|
||||
required String from,
|
||||
required String to,
|
||||
required bool shouldNotifyListeners,
|
||||
}) async {
|
||||
if (from == to) {
|
||||
return true;
|
||||
}
|
||||
|
||||
final walletInfo = DB.instance
|
||||
.get<dynamic>(boxName: DB.boxNameAllWalletsData, key: 'names') as Map;
|
||||
|
||||
final info = walletInfo.values.firstWhere(
|
||||
(element) => element['name'] == from,
|
||||
orElse: () => <String, String>{}) as Map;
|
||||
|
||||
if (info.isEmpty) {
|
||||
// tried to rename a non existing wallet
|
||||
Logging.instance
|
||||
.log("Tried to rename a non existing wallet!", level: LogLevel.Error);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (from != to &&
|
||||
(walletInfo.values.firstWhere((element) => element['name'] == to,
|
||||
orElse: () => <String, String>{}) as Map)
|
||||
.isNotEmpty) {
|
||||
// name already exists
|
||||
Logging.instance.log("wallet with name \"$to\" already exists!",
|
||||
level: LogLevel.Error);
|
||||
return false;
|
||||
}
|
||||
|
||||
info["name"] = to;
|
||||
walletInfo[info['id']] = info;
|
||||
|
||||
await DB.instance.put<dynamic>(
|
||||
boxName: DB.boxNameAllWalletsData, key: 'names', value: walletInfo);
|
||||
await refreshWallets(shouldNotifyListeners);
|
||||
return true;
|
||||
}
|
||||
@Deprecated("Legacy support only. Do not use.")
|
||||
WalletsService();
|
||||
|
||||
@Deprecated("Legacy support only. Do not use.")
|
||||
Future<Map<String, WalletInfo>> _fetchWalletNames() async {
|
||||
final names = DB.instance
|
||||
.get<dynamic>(boxName: DB.boxNameAllWalletsData, key: 'names') as Map?;
|
||||
|
@ -149,322 +100,4 @@ class WalletsService extends ChangeNotifier {
|
|||
return mapped.map((name, dyn) => MapEntry(
|
||||
name, WalletInfo.fromJson(Map<String, dynamic>.from(dyn as Map))));
|
||||
}
|
||||
|
||||
Map<String, WalletInfo> fetchWalletsData() {
|
||||
final names = DB.instance.get<dynamic>(
|
||||
boxName: DB.boxNameAllWalletsData, key: 'names') as Map? ??
|
||||
{};
|
||||
|
||||
Logging.instance.log("Fetched wallet names: $names", level: LogLevel.Info);
|
||||
final mapped = Map<String, dynamic>.from(names);
|
||||
mapped.removeWhere((name, dyn) {
|
||||
final jsonObject = Map<String, dynamic>.from(dyn as Map);
|
||||
try {
|
||||
Coin.values.byName(jsonObject["coin"] as String);
|
||||
return false;
|
||||
} catch (e, s) {
|
||||
Logging.instance.log("Error, ${jsonObject["coin"]} does not exist",
|
||||
level: LogLevel.Error);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
return mapped.map((name, dyn) => MapEntry(
|
||||
name, WalletInfo.fromJson(Map<String, dynamic>.from(dyn as Map))));
|
||||
}
|
||||
|
||||
Future<void> addExistingStackWallet({
|
||||
required String name,
|
||||
required String walletId,
|
||||
required Coin coin,
|
||||
required bool shouldNotifyListeners,
|
||||
}) async {
|
||||
final _names = DB.instance
|
||||
.get<dynamic>(boxName: DB.boxNameAllWalletsData, key: 'names') as Map?;
|
||||
|
||||
Map<String, dynamic> names;
|
||||
if (_names == null) {
|
||||
names = {};
|
||||
} else {
|
||||
names = Map<String, dynamic>.from(_names);
|
||||
}
|
||||
|
||||
if (names.keys.contains(walletId)) {
|
||||
throw Exception("Wallet with walletId \"$walletId\" already exists!");
|
||||
}
|
||||
if (names.values.where((element) => element['name'] == name).isNotEmpty) {
|
||||
throw Exception("Wallet with name \"$name\" already exists!");
|
||||
}
|
||||
|
||||
names[walletId] = {
|
||||
"id": walletId,
|
||||
"coin": coin.name,
|
||||
"name": name,
|
||||
};
|
||||
|
||||
await DB.instance.put<dynamic>(
|
||||
boxName: DB.boxNameAllWalletsData, key: 'names', value: names);
|
||||
await DB.instance.put<dynamic>(
|
||||
boxName: DB.boxNameAllWalletsData,
|
||||
key: "${walletId}_cryptoCurrency",
|
||||
value: coin.name);
|
||||
await DB.instance.put<dynamic>(
|
||||
boxName: DB.boxNameAllWalletsData,
|
||||
key: "${walletId}_mnemonicHasBeenVerified",
|
||||
value: false);
|
||||
await DB.instance.addWalletBox(walletId: walletId);
|
||||
await refreshWallets(shouldNotifyListeners);
|
||||
}
|
||||
|
||||
/// returns the new walletId if successful, otherwise null
|
||||
Future<String?> addNewWallet({
|
||||
required String name,
|
||||
required Coin coin,
|
||||
required bool shouldNotifyListeners,
|
||||
}) async {
|
||||
final _names = DB.instance
|
||||
.get<dynamic>(boxName: DB.boxNameAllWalletsData, key: 'names') as Map?;
|
||||
|
||||
Map<String, dynamic> names;
|
||||
if (_names == null) {
|
||||
names = {};
|
||||
} else {
|
||||
names = Map<String, dynamic>.from(_names);
|
||||
}
|
||||
|
||||
// Prevent overwriting or storing empty names
|
||||
if (name.isEmpty ||
|
||||
names.values.where((element) => element['name'] == name).isNotEmpty) {
|
||||
return null;
|
||||
}
|
||||
|
||||
final id = const Uuid().v1();
|
||||
names[id] = {
|
||||
"id": id,
|
||||
"coin": coin.name,
|
||||
"name": name,
|
||||
};
|
||||
|
||||
await DB.instance.put<dynamic>(
|
||||
boxName: DB.boxNameAllWalletsData, key: 'names', value: names);
|
||||
await DB.instance.put<dynamic>(
|
||||
boxName: DB.boxNameAllWalletsData,
|
||||
key: "${id}_cryptoCurrency",
|
||||
value: coin.name);
|
||||
await DB.instance.put<dynamic>(
|
||||
boxName: DB.boxNameAllWalletsData,
|
||||
key: "${id}_mnemonicHasBeenVerified",
|
||||
value: false);
|
||||
await DB.instance.addWalletBox(walletId: id);
|
||||
await refreshWallets(shouldNotifyListeners);
|
||||
return id;
|
||||
}
|
||||
|
||||
Future<List<String>> getFavoriteWalletIds() async {
|
||||
return DB.instance
|
||||
.values<String>(boxName: DB.boxNameFavoriteWallets)
|
||||
.toList();
|
||||
}
|
||||
|
||||
Future<void> saveFavoriteWalletIds(List<String> walletIds) async {
|
||||
await DB.instance.deleteAll<String>(boxName: DB.boxNameFavoriteWallets);
|
||||
await DB.instance
|
||||
.addAll(boxName: DB.boxNameFavoriteWallets, values: walletIds);
|
||||
//todo: check if print needed
|
||||
// debugPrint("saveFavoriteWalletIds list: $walletIds");
|
||||
}
|
||||
|
||||
Future<void> addFavorite(String walletId) async {
|
||||
final list = await getFavoriteWalletIds();
|
||||
if (!list.contains(walletId)) {
|
||||
list.add(walletId);
|
||||
}
|
||||
await saveFavoriteWalletIds(list);
|
||||
}
|
||||
|
||||
Future<void> removeFavorite(String walletId) async {
|
||||
final list = await getFavoriteWalletIds();
|
||||
list.remove(walletId);
|
||||
await saveFavoriteWalletIds(list);
|
||||
}
|
||||
|
||||
Future<void> moveFavorite({
|
||||
required int fromIndex,
|
||||
required int toIndex,
|
||||
}) async {
|
||||
final list = await getFavoriteWalletIds();
|
||||
if (fromIndex < toIndex) {
|
||||
toIndex -= 1;
|
||||
}
|
||||
final walletId = list.removeAt(fromIndex);
|
||||
list.insert(toIndex, walletId);
|
||||
await saveFavoriteWalletIds(list);
|
||||
}
|
||||
|
||||
Future<bool> checkForDuplicate(String name) async {
|
||||
final names = DB.instance
|
||||
.get<dynamic>(boxName: DB.boxNameAllWalletsData, key: 'names') as Map?;
|
||||
if (names == null) return false;
|
||||
|
||||
return names.values.where((element) => element['name'] == name).isNotEmpty;
|
||||
}
|
||||
|
||||
Future<String?> getWalletId(String walletName) async {
|
||||
final names = DB.instance
|
||||
.get<dynamic>(boxName: DB.boxNameAllWalletsData, key: 'names') as Map;
|
||||
final shells =
|
||||
names.values.where((element) => element['name'] == walletName);
|
||||
if (shells.isEmpty) {
|
||||
return null;
|
||||
}
|
||||
return shells.first["id"] as String;
|
||||
}
|
||||
|
||||
Future<bool> isMnemonicVerified({required String walletId}) async {
|
||||
final isVerified = DB.instance.get<dynamic>(
|
||||
boxName: DB.boxNameAllWalletsData,
|
||||
key: "${walletId}_mnemonicHasBeenVerified") as bool?;
|
||||
|
||||
if (isVerified == null) {
|
||||
Logging.instance.log(
|
||||
"isMnemonicVerified(walletId: $walletId) returned null which should never happen!",
|
||||
level: LogLevel.Error,
|
||||
);
|
||||
throw Exception(
|
||||
"isMnemonicVerified(walletId: $walletId) returned null which should never happen!");
|
||||
} else {
|
||||
return isVerified;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> setMnemonicVerified({required String walletId}) async {
|
||||
final isVerified = DB.instance.get<dynamic>(
|
||||
boxName: DB.boxNameAllWalletsData,
|
||||
key: "${walletId}_mnemonicHasBeenVerified") as bool?;
|
||||
|
||||
if (isVerified == null) {
|
||||
Logging.instance.log(
|
||||
"setMnemonicVerified(walletId: $walletId) tried running on non existent wallet!",
|
||||
level: LogLevel.Error,
|
||||
);
|
||||
throw Exception(
|
||||
"setMnemonicVerified(walletId: $walletId) tried running on non existent wallet!");
|
||||
} else if (isVerified) {
|
||||
Logging.instance.log(
|
||||
"setMnemonicVerified(walletId: $walletId) tried running on already verified wallet!",
|
||||
level: LogLevel.Error,
|
||||
);
|
||||
throw Exception(
|
||||
"setMnemonicVerified(walletId: $walletId) tried running on already verified wallet!");
|
||||
} else {
|
||||
await DB.instance.put<dynamic>(
|
||||
boxName: DB.boxNameAllWalletsData,
|
||||
key: "${walletId}_mnemonicHasBeenVerified",
|
||||
value: true);
|
||||
Logging.instance.log(
|
||||
"setMnemonicVerified(walletId: $walletId) successful",
|
||||
level: LogLevel.Error,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// pin + mnemonic as well as anything else in secureStore
|
||||
Future<int> deleteWallet(String name, bool shouldNotifyListeners) async {
|
||||
final names = DB.instance.get<dynamic>(
|
||||
boxName: DB.boxNameAllWalletsData, key: 'names') as Map? ??
|
||||
{};
|
||||
|
||||
final walletId = await getWalletId(name);
|
||||
if (walletId == null) {
|
||||
return 3;
|
||||
}
|
||||
|
||||
Logging.instance.log(
|
||||
"deleteWallet called with name=$name and id=$walletId",
|
||||
level: LogLevel.Warning,
|
||||
);
|
||||
|
||||
final shell = names.remove(walletId);
|
||||
|
||||
if (shell == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// TODO delete derivations!!!
|
||||
await _secureStore.delete(key: "${walletId}_pin");
|
||||
await _secureStore.delete(key: "${walletId}_mnemonic");
|
||||
|
||||
await DB.instance.delete<dynamic>(
|
||||
boxName: DB.boxNameAllWalletsData, key: "${walletId}_cryptoCurrency");
|
||||
await DB.instance.delete<dynamic>(
|
||||
boxName: DB.boxNameAllWalletsData,
|
||||
key: "${walletId}_mnemonicHasBeenVerified");
|
||||
if (coinFromPrettyName(shell['coin'] as String) == Coin.wownero) {
|
||||
final wowService =
|
||||
wownero.createWowneroWalletService(DB.instance.moneroWalletInfoBox);
|
||||
await wowService.remove(walletId);
|
||||
Logging.instance
|
||||
.log("monero wallet: $walletId deleted", level: LogLevel.Info);
|
||||
} else if (coinFromPrettyName(shell['coin'] as String) == Coin.monero) {
|
||||
final xmrService =
|
||||
monero.createMoneroWalletService(DB.instance.moneroWalletInfoBox);
|
||||
await xmrService.remove(walletId);
|
||||
Logging.instance
|
||||
.log("monero wallet: $walletId deleted", level: LogLevel.Info);
|
||||
} else if (coinFromPrettyName(shell['coin'] as String) == Coin.epicCash) {
|
||||
final deleteResult =
|
||||
await deleteEpicWallet(walletId: walletId, secureStore: _secureStore);
|
||||
Logging.instance.log(
|
||||
"epic wallet: $walletId deleted with result: $deleteResult",
|
||||
level: LogLevel.Info);
|
||||
}
|
||||
|
||||
// delete wallet data in main db
|
||||
await MainDB.instance.deleteWalletBlockchainData(walletId);
|
||||
await MainDB.instance.deleteAddressLabels(walletId);
|
||||
await MainDB.instance.deleteTransactionNotes(walletId);
|
||||
|
||||
// box data may currently still be read/written to if wallet was refreshing
|
||||
// when delete was requested so instead of deleting now we mark the wallet
|
||||
// as needs delete by adding it's id to a list which gets checked on app start
|
||||
await DB.instance.add<String>(
|
||||
boxName: DB.boxNameWalletsToDeleteOnStart, value: walletId);
|
||||
|
||||
final lookupService = TradeSentFromStackService();
|
||||
for (final lookup in lookupService.all) {
|
||||
if (lookup.walletIds.contains(walletId)) {
|
||||
// update lookup data to reflect deleted wallet
|
||||
await lookupService.save(
|
||||
tradeWalletLookup: lookup.copyWith(
|
||||
walletIds: lookup.walletIds.where((id) => id != walletId).toList(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// delete notifications tied to deleted wallet
|
||||
for (final notification in NotificationsService.instance.notifications) {
|
||||
if (notification.walletId == walletId) {
|
||||
await NotificationsService.instance.delete(notification, false);
|
||||
}
|
||||
}
|
||||
|
||||
if (names.isEmpty) {
|
||||
await DB.instance.deleteAll<dynamic>(boxName: DB.boxNameAllWalletsData);
|
||||
_walletNames = Future(() => {});
|
||||
notifyListeners();
|
||||
return 2; // error code no wallets on device
|
||||
}
|
||||
|
||||
await DB.instance.put<dynamic>(
|
||||
boxName: DB.boxNameAllWalletsData, key: 'names', value: names);
|
||||
await refreshWallets(shouldNotifyListeners);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Future<void> refreshWallets(bool shouldNotifyListeners) async {
|
||||
final newNames = await _fetchWalletNames();
|
||||
_walletNames = Future(() => newNames);
|
||||
if (shouldNotifyListeners) notifyListeners();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i4;
|
||||
import 'dart:ui' as _i6;
|
||||
import 'dart:ui' as _i5;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:stackwallet/models/node_model.dart' as _i8;
|
||||
import 'package:stackwallet/services/node_service.dart' as _i7;
|
||||
import 'package:stackwallet/models/node_model.dart' as _i7;
|
||||
import 'package:stackwallet/services/node_service.dart' as _i6;
|
||||
import 'package:stackwallet/services/wallets_service.dart' as _i3;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i5;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8;
|
||||
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'
|
||||
as _i2;
|
||||
|
||||
|
@ -53,187 +53,7 @@ class MockWalletsService extends _i1.Mock implements _i3.WalletsService {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i4.Future<bool> renameWallet({
|
||||
required String? from,
|
||||
required String? to,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#renameWallet,
|
||||
[],
|
||||
{
|
||||
#from: from,
|
||||
#to: to,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
) as _i4.Future<bool>);
|
||||
@override
|
||||
Map<String, _i3.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchWalletsData,
|
||||
[],
|
||||
),
|
||||
returnValue: <String, _i3.WalletInfo>{},
|
||||
) as Map<String, _i3.WalletInfo>);
|
||||
@override
|
||||
_i4.Future<void> addExistingStackWallet({
|
||||
required String? name,
|
||||
required String? walletId,
|
||||
required _i5.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addExistingStackWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#walletId: walletId,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<String?> addNewWallet({
|
||||
required String? name,
|
||||
required _i5.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNewWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<String?>.value(),
|
||||
) as _i4.Future<String?>);
|
||||
@override
|
||||
_i4.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getFavoriteWalletIds,
|
||||
[],
|
||||
),
|
||||
returnValue: _i4.Future<List<String>>.value(<String>[]),
|
||||
) as _i4.Future<List<String>>);
|
||||
@override
|
||||
_i4.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#saveFavoriteWalletIds,
|
||||
[walletIds],
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<void> moveFavorite({
|
||||
required int? fromIndex,
|
||||
required int? toIndex,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#moveFavorite,
|
||||
[],
|
||||
{
|
||||
#fromIndex: fromIndex,
|
||||
#toIndex: toIndex,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#checkForDuplicate,
|
||||
[name],
|
||||
),
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
) as _i4.Future<bool>);
|
||||
@override
|
||||
_i4.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getWalletId,
|
||||
[walletName],
|
||||
),
|
||||
returnValue: _i4.Future<String?>.value(),
|
||||
) as _i4.Future<String?>);
|
||||
@override
|
||||
_i4.Future<bool> isMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#isMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
) as _i4.Future<bool>);
|
||||
@override
|
||||
_i4.Future<void> setMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<int> deleteWallet(
|
||||
String? name,
|
||||
bool? shouldNotifyListeners,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteWallet,
|
||||
[
|
||||
name,
|
||||
shouldNotifyListeners,
|
||||
],
|
||||
),
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
) as _i4.Future<int>);
|
||||
@override
|
||||
_i4.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#refreshWallets,
|
||||
[shouldNotifyListeners],
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
void addListener(_i6.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
|
@ -241,7 +61,7 @@ class MockWalletsService extends _i1.Mock implements _i3.WalletsService {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void removeListener(_i6.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
@ -269,7 +89,7 @@ class MockWalletsService extends _i1.Mock implements _i3.WalletsService {
|
|||
/// A class which mocks [NodeService].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockNodeService extends _i1.Mock implements _i7.NodeService {
|
||||
class MockNodeService extends _i1.Mock implements _i6.NodeService {
|
||||
@override
|
||||
_i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod(
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
|
@ -279,15 +99,15 @@ class MockNodeService extends _i1.Mock implements _i7.NodeService {
|
|||
),
|
||||
) as _i2.SecureStorageInterface);
|
||||
@override
|
||||
List<_i8.NodeModel> get primaryNodes => (super.noSuchMethod(
|
||||
List<_i7.NodeModel> get primaryNodes => (super.noSuchMethod(
|
||||
Invocation.getter(#primaryNodes),
|
||||
returnValue: <_i8.NodeModel>[],
|
||||
) as List<_i8.NodeModel>);
|
||||
returnValue: <_i7.NodeModel>[],
|
||||
) as List<_i7.NodeModel>);
|
||||
@override
|
||||
List<_i8.NodeModel> get nodes => (super.noSuchMethod(
|
||||
List<_i7.NodeModel> get nodes => (super.noSuchMethod(
|
||||
Invocation.getter(#nodes),
|
||||
returnValue: <_i8.NodeModel>[],
|
||||
) as List<_i8.NodeModel>);
|
||||
returnValue: <_i7.NodeModel>[],
|
||||
) as List<_i7.NodeModel>);
|
||||
@override
|
||||
bool get hasListeners => (super.noSuchMethod(
|
||||
Invocation.getter(#hasListeners),
|
||||
|
@ -304,8 +124,8 @@ class MockNodeService extends _i1.Mock implements _i7.NodeService {
|
|||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<void> setPrimaryNodeFor({
|
||||
required _i5.Coin? coin,
|
||||
required _i8.NodeModel? node,
|
||||
required _i8.Coin? coin,
|
||||
required _i7.NodeModel? node,
|
||||
bool? shouldNotifyListeners = false,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
|
@ -322,40 +142,40 @@ class MockNodeService extends _i1.Mock implements _i7.NodeService {
|
|||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i8.NodeModel? getPrimaryNodeFor({required _i5.Coin? coin}) =>
|
||||
_i7.NodeModel? getPrimaryNodeFor({required _i8.Coin? coin}) =>
|
||||
(super.noSuchMethod(Invocation.method(
|
||||
#getPrimaryNodeFor,
|
||||
[],
|
||||
{#coin: coin},
|
||||
)) as _i8.NodeModel?);
|
||||
)) as _i7.NodeModel?);
|
||||
@override
|
||||
List<_i8.NodeModel> getNodesFor(_i5.Coin? coin) => (super.noSuchMethod(
|
||||
List<_i7.NodeModel> getNodesFor(_i8.Coin? coin) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getNodesFor,
|
||||
[coin],
|
||||
),
|
||||
returnValue: <_i8.NodeModel>[],
|
||||
) as List<_i8.NodeModel>);
|
||||
returnValue: <_i7.NodeModel>[],
|
||||
) as List<_i7.NodeModel>);
|
||||
@override
|
||||
_i8.NodeModel? getNodeById({required String? id}) =>
|
||||
_i7.NodeModel? getNodeById({required String? id}) =>
|
||||
(super.noSuchMethod(Invocation.method(
|
||||
#getNodeById,
|
||||
[],
|
||||
{#id: id},
|
||||
)) as _i8.NodeModel?);
|
||||
)) as _i7.NodeModel?);
|
||||
@override
|
||||
List<_i8.NodeModel> failoverNodesFor({required _i5.Coin? coin}) =>
|
||||
List<_i7.NodeModel> failoverNodesFor({required _i8.Coin? coin}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#failoverNodesFor,
|
||||
[],
|
||||
{#coin: coin},
|
||||
),
|
||||
returnValue: <_i8.NodeModel>[],
|
||||
) as List<_i8.NodeModel>);
|
||||
returnValue: <_i7.NodeModel>[],
|
||||
) as List<_i7.NodeModel>);
|
||||
@override
|
||||
_i4.Future<void> add(
|
||||
_i8.NodeModel? node,
|
||||
_i7.NodeModel? node,
|
||||
String? password,
|
||||
bool? shouldNotifyListeners,
|
||||
) =>
|
||||
|
@ -407,7 +227,7 @@ class MockNodeService extends _i1.Mock implements _i7.NodeService {
|
|||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<void> edit(
|
||||
_i8.NodeModel? editedNode,
|
||||
_i7.NodeModel? editedNode,
|
||||
String? password,
|
||||
bool? shouldNotifyListeners,
|
||||
) =>
|
||||
|
@ -433,7 +253,7 @@ class MockNodeService extends _i1.Mock implements _i7.NodeService {
|
|||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
void addListener(_i6.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
|
@ -441,7 +261,7 @@ class MockNodeService extends _i1.Mock implements _i7.NodeService {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void removeListener(_i6.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i3;
|
||||
import 'dart:ui' as _i5;
|
||||
import 'dart:ui' as _i4;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:stackwallet/services/locale_service.dart' as _i6;
|
||||
import 'package:stackwallet/services/locale_service.dart' as _i5;
|
||||
import 'package:stackwallet/services/wallets_service.dart' as _i2;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
|
@ -39,187 +38,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i3.Future<bool> renameWallet({
|
||||
required String? from,
|
||||
required String? to,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#renameWallet,
|
||||
[],
|
||||
{
|
||||
#from: from,
|
||||
#to: to,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
Map<String, _i2.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchWalletsData,
|
||||
[],
|
||||
),
|
||||
returnValue: <String, _i2.WalletInfo>{},
|
||||
) as Map<String, _i2.WalletInfo>);
|
||||
@override
|
||||
_i3.Future<void> addExistingStackWallet({
|
||||
required String? name,
|
||||
required String? walletId,
|
||||
required _i4.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addExistingStackWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#walletId: walletId,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<String?> addNewWallet({
|
||||
required String? name,
|
||||
required _i4.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNewWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<String?>.value(),
|
||||
) as _i3.Future<String?>);
|
||||
@override
|
||||
_i3.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getFavoriteWalletIds,
|
||||
[],
|
||||
),
|
||||
returnValue: _i3.Future<List<String>>.value(<String>[]),
|
||||
) as _i3.Future<List<String>>);
|
||||
@override
|
||||
_i3.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#saveFavoriteWalletIds,
|
||||
[walletIds],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> moveFavorite({
|
||||
required int? fromIndex,
|
||||
required int? toIndex,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#moveFavorite,
|
||||
[],
|
||||
{
|
||||
#fromIndex: fromIndex,
|
||||
#toIndex: toIndex,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#checkForDuplicate,
|
||||
[name],
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
_i3.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getWalletId,
|
||||
[walletName],
|
||||
),
|
||||
returnValue: _i3.Future<String?>.value(),
|
||||
) as _i3.Future<String?>);
|
||||
@override
|
||||
_i3.Future<bool> isMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#isMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
_i3.Future<void> setMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<int> deleteWallet(
|
||||
String? name,
|
||||
bool? shouldNotifyListeners,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteWallet,
|
||||
[
|
||||
name,
|
||||
shouldNotifyListeners,
|
||||
],
|
||||
),
|
||||
returnValue: _i3.Future<int>.value(0),
|
||||
) as _i3.Future<int>);
|
||||
@override
|
||||
_i3.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#refreshWallets,
|
||||
[shouldNotifyListeners],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
void addListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
|
@ -227,7 +46,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
@ -255,7 +74,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService {
|
|||
/// A class which mocks [LocaleService].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockLocaleService extends _i1.Mock implements _i6.LocaleService {
|
||||
class MockLocaleService extends _i1.Mock implements _i5.LocaleService {
|
||||
@override
|
||||
String get locale => (super.noSuchMethod(
|
||||
Invocation.getter(#locale),
|
||||
|
@ -277,7 +96,7 @@ class MockLocaleService extends _i1.Mock implements _i6.LocaleService {
|
|||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
void addListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
|
@ -285,7 +104,7 @@ class MockLocaleService extends _i1.Mock implements _i6.LocaleService {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i3;
|
||||
import 'dart:ui' as _i5;
|
||||
import 'dart:ui' as _i4;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:stackwallet/services/locale_service.dart' as _i6;
|
||||
import 'package:stackwallet/services/locale_service.dart' as _i5;
|
||||
import 'package:stackwallet/services/wallets_service.dart' as _i2;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
|
@ -39,187 +38,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i3.Future<bool> renameWallet({
|
||||
required String? from,
|
||||
required String? to,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#renameWallet,
|
||||
[],
|
||||
{
|
||||
#from: from,
|
||||
#to: to,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
Map<String, _i2.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchWalletsData,
|
||||
[],
|
||||
),
|
||||
returnValue: <String, _i2.WalletInfo>{},
|
||||
) as Map<String, _i2.WalletInfo>);
|
||||
@override
|
||||
_i3.Future<void> addExistingStackWallet({
|
||||
required String? name,
|
||||
required String? walletId,
|
||||
required _i4.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addExistingStackWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#walletId: walletId,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<String?> addNewWallet({
|
||||
required String? name,
|
||||
required _i4.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNewWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<String?>.value(),
|
||||
) as _i3.Future<String?>);
|
||||
@override
|
||||
_i3.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getFavoriteWalletIds,
|
||||
[],
|
||||
),
|
||||
returnValue: _i3.Future<List<String>>.value(<String>[]),
|
||||
) as _i3.Future<List<String>>);
|
||||
@override
|
||||
_i3.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#saveFavoriteWalletIds,
|
||||
[walletIds],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> moveFavorite({
|
||||
required int? fromIndex,
|
||||
required int? toIndex,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#moveFavorite,
|
||||
[],
|
||||
{
|
||||
#fromIndex: fromIndex,
|
||||
#toIndex: toIndex,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#checkForDuplicate,
|
||||
[name],
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
_i3.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getWalletId,
|
||||
[walletName],
|
||||
),
|
||||
returnValue: _i3.Future<String?>.value(),
|
||||
) as _i3.Future<String?>);
|
||||
@override
|
||||
_i3.Future<bool> isMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#isMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
_i3.Future<void> setMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<int> deleteWallet(
|
||||
String? name,
|
||||
bool? shouldNotifyListeners,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteWallet,
|
||||
[
|
||||
name,
|
||||
shouldNotifyListeners,
|
||||
],
|
||||
),
|
||||
returnValue: _i3.Future<int>.value(0),
|
||||
) as _i3.Future<int>);
|
||||
@override
|
||||
_i3.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#refreshWallets,
|
||||
[shouldNotifyListeners],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
void addListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
|
@ -227,7 +46,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
@ -255,7 +74,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService {
|
|||
/// A class which mocks [LocaleService].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockLocaleService extends _i1.Mock implements _i6.LocaleService {
|
||||
class MockLocaleService extends _i1.Mock implements _i5.LocaleService {
|
||||
@override
|
||||
String get locale => (super.noSuchMethod(
|
||||
Invocation.getter(#locale),
|
||||
|
@ -277,7 +96,7 @@ class MockLocaleService extends _i1.Mock implements _i6.LocaleService {
|
|||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
void addListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
|
@ -285,7 +104,7 @@ class MockLocaleService extends _i1.Mock implements _i6.LocaleService {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i3;
|
||||
import 'dart:ui' as _i5;
|
||||
import 'dart:ui' as _i4;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:stackwallet/services/locale_service.dart' as _i6;
|
||||
import 'package:stackwallet/services/locale_service.dart' as _i5;
|
||||
import 'package:stackwallet/services/wallets_service.dart' as _i2;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
|
@ -39,187 +38,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i3.Future<bool> renameWallet({
|
||||
required String? from,
|
||||
required String? to,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#renameWallet,
|
||||
[],
|
||||
{
|
||||
#from: from,
|
||||
#to: to,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
Map<String, _i2.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchWalletsData,
|
||||
[],
|
||||
),
|
||||
returnValue: <String, _i2.WalletInfo>{},
|
||||
) as Map<String, _i2.WalletInfo>);
|
||||
@override
|
||||
_i3.Future<void> addExistingStackWallet({
|
||||
required String? name,
|
||||
required String? walletId,
|
||||
required _i4.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addExistingStackWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#walletId: walletId,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<String?> addNewWallet({
|
||||
required String? name,
|
||||
required _i4.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNewWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<String?>.value(),
|
||||
) as _i3.Future<String?>);
|
||||
@override
|
||||
_i3.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getFavoriteWalletIds,
|
||||
[],
|
||||
),
|
||||
returnValue: _i3.Future<List<String>>.value(<String>[]),
|
||||
) as _i3.Future<List<String>>);
|
||||
@override
|
||||
_i3.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#saveFavoriteWalletIds,
|
||||
[walletIds],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> moveFavorite({
|
||||
required int? fromIndex,
|
||||
required int? toIndex,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#moveFavorite,
|
||||
[],
|
||||
{
|
||||
#fromIndex: fromIndex,
|
||||
#toIndex: toIndex,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#checkForDuplicate,
|
||||
[name],
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
_i3.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getWalletId,
|
||||
[walletName],
|
||||
),
|
||||
returnValue: _i3.Future<String?>.value(),
|
||||
) as _i3.Future<String?>);
|
||||
@override
|
||||
_i3.Future<bool> isMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#isMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
_i3.Future<void> setMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<int> deleteWallet(
|
||||
String? name,
|
||||
bool? shouldNotifyListeners,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteWallet,
|
||||
[
|
||||
name,
|
||||
shouldNotifyListeners,
|
||||
],
|
||||
),
|
||||
returnValue: _i3.Future<int>.value(0),
|
||||
) as _i3.Future<int>);
|
||||
@override
|
||||
_i3.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#refreshWallets,
|
||||
[shouldNotifyListeners],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
void addListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
|
@ -227,7 +46,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
@ -255,7 +74,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService {
|
|||
/// A class which mocks [LocaleService].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockLocaleService extends _i1.Mock implements _i6.LocaleService {
|
||||
class MockLocaleService extends _i1.Mock implements _i5.LocaleService {
|
||||
@override
|
||||
String get locale => (super.noSuchMethod(
|
||||
Invocation.getter(#locale),
|
||||
|
@ -277,7 +96,7 @@ class MockLocaleService extends _i1.Mock implements _i6.LocaleService {
|
|||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
void addListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
|
@ -285,7 +104,7 @@ class MockLocaleService extends _i1.Mock implements _i6.LocaleService {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
|
|
@ -4,11 +4,10 @@
|
|||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i3;
|
||||
import 'dart:ui' as _i5;
|
||||
import 'dart:ui' as _i4;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:stackwallet/services/wallets_service.dart' as _i2;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
|
@ -38,187 +37,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i3.Future<bool> renameWallet({
|
||||
required String? from,
|
||||
required String? to,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#renameWallet,
|
||||
[],
|
||||
{
|
||||
#from: from,
|
||||
#to: to,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
Map<String, _i2.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchWalletsData,
|
||||
[],
|
||||
),
|
||||
returnValue: <String, _i2.WalletInfo>{},
|
||||
) as Map<String, _i2.WalletInfo>);
|
||||
@override
|
||||
_i3.Future<void> addExistingStackWallet({
|
||||
required String? name,
|
||||
required String? walletId,
|
||||
required _i4.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addExistingStackWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#walletId: walletId,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<String?> addNewWallet({
|
||||
required String? name,
|
||||
required _i4.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNewWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<String?>.value(),
|
||||
) as _i3.Future<String?>);
|
||||
@override
|
||||
_i3.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getFavoriteWalletIds,
|
||||
[],
|
||||
),
|
||||
returnValue: _i3.Future<List<String>>.value(<String>[]),
|
||||
) as _i3.Future<List<String>>);
|
||||
@override
|
||||
_i3.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#saveFavoriteWalletIds,
|
||||
[walletIds],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> moveFavorite({
|
||||
required int? fromIndex,
|
||||
required int? toIndex,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#moveFavorite,
|
||||
[],
|
||||
{
|
||||
#fromIndex: fromIndex,
|
||||
#toIndex: toIndex,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#checkForDuplicate,
|
||||
[name],
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
_i3.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getWalletId,
|
||||
[walletName],
|
||||
),
|
||||
returnValue: _i3.Future<String?>.value(),
|
||||
) as _i3.Future<String?>);
|
||||
@override
|
||||
_i3.Future<bool> isMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#isMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
_i3.Future<void> setMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<int> deleteWallet(
|
||||
String? name,
|
||||
bool? shouldNotifyListeners,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteWallet,
|
||||
[
|
||||
name,
|
||||
shouldNotifyListeners,
|
||||
],
|
||||
),
|
||||
returnValue: _i3.Future<int>.value(0),
|
||||
) as _i3.Future<int>);
|
||||
@override
|
||||
_i3.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#refreshWallets,
|
||||
[shouldNotifyListeners],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
void addListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
|
@ -226,7 +45,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i4;
|
||||
import 'dart:ui' as _i6;
|
||||
import 'dart:ui' as _i5;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:stackwallet/models/node_model.dart' as _i8;
|
||||
import 'package:stackwallet/services/node_service.dart' as _i7;
|
||||
import 'package:stackwallet/models/node_model.dart' as _i7;
|
||||
import 'package:stackwallet/services/node_service.dart' as _i6;
|
||||
import 'package:stackwallet/services/wallets_service.dart' as _i3;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i5;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8;
|
||||
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'
|
||||
as _i2;
|
||||
|
||||
|
@ -53,187 +53,7 @@ class MockWalletsService extends _i1.Mock implements _i3.WalletsService {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i4.Future<bool> renameWallet({
|
||||
required String? from,
|
||||
required String? to,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#renameWallet,
|
||||
[],
|
||||
{
|
||||
#from: from,
|
||||
#to: to,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
) as _i4.Future<bool>);
|
||||
@override
|
||||
Map<String, _i3.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchWalletsData,
|
||||
[],
|
||||
),
|
||||
returnValue: <String, _i3.WalletInfo>{},
|
||||
) as Map<String, _i3.WalletInfo>);
|
||||
@override
|
||||
_i4.Future<void> addExistingStackWallet({
|
||||
required String? name,
|
||||
required String? walletId,
|
||||
required _i5.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addExistingStackWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#walletId: walletId,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<String?> addNewWallet({
|
||||
required String? name,
|
||||
required _i5.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNewWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<String?>.value(),
|
||||
) as _i4.Future<String?>);
|
||||
@override
|
||||
_i4.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getFavoriteWalletIds,
|
||||
[],
|
||||
),
|
||||
returnValue: _i4.Future<List<String>>.value(<String>[]),
|
||||
) as _i4.Future<List<String>>);
|
||||
@override
|
||||
_i4.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#saveFavoriteWalletIds,
|
||||
[walletIds],
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<void> moveFavorite({
|
||||
required int? fromIndex,
|
||||
required int? toIndex,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#moveFavorite,
|
||||
[],
|
||||
{
|
||||
#fromIndex: fromIndex,
|
||||
#toIndex: toIndex,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#checkForDuplicate,
|
||||
[name],
|
||||
),
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
) as _i4.Future<bool>);
|
||||
@override
|
||||
_i4.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getWalletId,
|
||||
[walletName],
|
||||
),
|
||||
returnValue: _i4.Future<String?>.value(),
|
||||
) as _i4.Future<String?>);
|
||||
@override
|
||||
_i4.Future<bool> isMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#isMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
) as _i4.Future<bool>);
|
||||
@override
|
||||
_i4.Future<void> setMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<int> deleteWallet(
|
||||
String? name,
|
||||
bool? shouldNotifyListeners,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteWallet,
|
||||
[
|
||||
name,
|
||||
shouldNotifyListeners,
|
||||
],
|
||||
),
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
) as _i4.Future<int>);
|
||||
@override
|
||||
_i4.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#refreshWallets,
|
||||
[shouldNotifyListeners],
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
void addListener(_i6.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
|
@ -241,7 +61,7 @@ class MockWalletsService extends _i1.Mock implements _i3.WalletsService {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void removeListener(_i6.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
@ -269,7 +89,7 @@ class MockWalletsService extends _i1.Mock implements _i3.WalletsService {
|
|||
/// A class which mocks [NodeService].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockNodeService extends _i1.Mock implements _i7.NodeService {
|
||||
class MockNodeService extends _i1.Mock implements _i6.NodeService {
|
||||
@override
|
||||
_i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod(
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
|
@ -279,15 +99,15 @@ class MockNodeService extends _i1.Mock implements _i7.NodeService {
|
|||
),
|
||||
) as _i2.SecureStorageInterface);
|
||||
@override
|
||||
List<_i8.NodeModel> get primaryNodes => (super.noSuchMethod(
|
||||
List<_i7.NodeModel> get primaryNodes => (super.noSuchMethod(
|
||||
Invocation.getter(#primaryNodes),
|
||||
returnValue: <_i8.NodeModel>[],
|
||||
) as List<_i8.NodeModel>);
|
||||
returnValue: <_i7.NodeModel>[],
|
||||
) as List<_i7.NodeModel>);
|
||||
@override
|
||||
List<_i8.NodeModel> get nodes => (super.noSuchMethod(
|
||||
List<_i7.NodeModel> get nodes => (super.noSuchMethod(
|
||||
Invocation.getter(#nodes),
|
||||
returnValue: <_i8.NodeModel>[],
|
||||
) as List<_i8.NodeModel>);
|
||||
returnValue: <_i7.NodeModel>[],
|
||||
) as List<_i7.NodeModel>);
|
||||
@override
|
||||
bool get hasListeners => (super.noSuchMethod(
|
||||
Invocation.getter(#hasListeners),
|
||||
|
@ -304,8 +124,8 @@ class MockNodeService extends _i1.Mock implements _i7.NodeService {
|
|||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<void> setPrimaryNodeFor({
|
||||
required _i5.Coin? coin,
|
||||
required _i8.NodeModel? node,
|
||||
required _i8.Coin? coin,
|
||||
required _i7.NodeModel? node,
|
||||
bool? shouldNotifyListeners = false,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
|
@ -322,40 +142,40 @@ class MockNodeService extends _i1.Mock implements _i7.NodeService {
|
|||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i8.NodeModel? getPrimaryNodeFor({required _i5.Coin? coin}) =>
|
||||
_i7.NodeModel? getPrimaryNodeFor({required _i8.Coin? coin}) =>
|
||||
(super.noSuchMethod(Invocation.method(
|
||||
#getPrimaryNodeFor,
|
||||
[],
|
||||
{#coin: coin},
|
||||
)) as _i8.NodeModel?);
|
||||
)) as _i7.NodeModel?);
|
||||
@override
|
||||
List<_i8.NodeModel> getNodesFor(_i5.Coin? coin) => (super.noSuchMethod(
|
||||
List<_i7.NodeModel> getNodesFor(_i8.Coin? coin) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getNodesFor,
|
||||
[coin],
|
||||
),
|
||||
returnValue: <_i8.NodeModel>[],
|
||||
) as List<_i8.NodeModel>);
|
||||
returnValue: <_i7.NodeModel>[],
|
||||
) as List<_i7.NodeModel>);
|
||||
@override
|
||||
_i8.NodeModel? getNodeById({required String? id}) =>
|
||||
_i7.NodeModel? getNodeById({required String? id}) =>
|
||||
(super.noSuchMethod(Invocation.method(
|
||||
#getNodeById,
|
||||
[],
|
||||
{#id: id},
|
||||
)) as _i8.NodeModel?);
|
||||
)) as _i7.NodeModel?);
|
||||
@override
|
||||
List<_i8.NodeModel> failoverNodesFor({required _i5.Coin? coin}) =>
|
||||
List<_i7.NodeModel> failoverNodesFor({required _i8.Coin? coin}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#failoverNodesFor,
|
||||
[],
|
||||
{#coin: coin},
|
||||
),
|
||||
returnValue: <_i8.NodeModel>[],
|
||||
) as List<_i8.NodeModel>);
|
||||
returnValue: <_i7.NodeModel>[],
|
||||
) as List<_i7.NodeModel>);
|
||||
@override
|
||||
_i4.Future<void> add(
|
||||
_i8.NodeModel? node,
|
||||
_i7.NodeModel? node,
|
||||
String? password,
|
||||
bool? shouldNotifyListeners,
|
||||
) =>
|
||||
|
@ -407,7 +227,7 @@ class MockNodeService extends _i1.Mock implements _i7.NodeService {
|
|||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<void> edit(
|
||||
_i8.NodeModel? editedNode,
|
||||
_i7.NodeModel? editedNode,
|
||||
String? password,
|
||||
bool? shouldNotifyListeners,
|
||||
) =>
|
||||
|
@ -433,7 +253,7 @@ class MockNodeService extends _i1.Mock implements _i7.NodeService {
|
|||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
void addListener(_i6.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
|
@ -441,7 +261,7 @@ class MockNodeService extends _i1.Mock implements _i7.NodeService {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void removeListener(_i6.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
|
|
@ -4,11 +4,10 @@
|
|||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i3;
|
||||
import 'dart:ui' as _i5;
|
||||
import 'dart:ui' as _i4;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:stackwallet/services/wallets_service.dart' as _i2;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
|
@ -38,187 +37,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i3.Future<bool> renameWallet({
|
||||
required String? from,
|
||||
required String? to,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#renameWallet,
|
||||
[],
|
||||
{
|
||||
#from: from,
|
||||
#to: to,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
Map<String, _i2.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchWalletsData,
|
||||
[],
|
||||
),
|
||||
returnValue: <String, _i2.WalletInfo>{},
|
||||
) as Map<String, _i2.WalletInfo>);
|
||||
@override
|
||||
_i3.Future<void> addExistingStackWallet({
|
||||
required String? name,
|
||||
required String? walletId,
|
||||
required _i4.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addExistingStackWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#walletId: walletId,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<String?> addNewWallet({
|
||||
required String? name,
|
||||
required _i4.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNewWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<String?>.value(),
|
||||
) as _i3.Future<String?>);
|
||||
@override
|
||||
_i3.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getFavoriteWalletIds,
|
||||
[],
|
||||
),
|
||||
returnValue: _i3.Future<List<String>>.value(<String>[]),
|
||||
) as _i3.Future<List<String>>);
|
||||
@override
|
||||
_i3.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#saveFavoriteWalletIds,
|
||||
[walletIds],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> moveFavorite({
|
||||
required int? fromIndex,
|
||||
required int? toIndex,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#moveFavorite,
|
||||
[],
|
||||
{
|
||||
#fromIndex: fromIndex,
|
||||
#toIndex: toIndex,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#checkForDuplicate,
|
||||
[name],
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
_i3.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getWalletId,
|
||||
[walletName],
|
||||
),
|
||||
returnValue: _i3.Future<String?>.value(),
|
||||
) as _i3.Future<String?>);
|
||||
@override
|
||||
_i3.Future<bool> isMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#isMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
_i3.Future<void> setMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<int> deleteWallet(
|
||||
String? name,
|
||||
bool? shouldNotifyListeners,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteWallet,
|
||||
[
|
||||
name,
|
||||
shouldNotifyListeners,
|
||||
],
|
||||
),
|
||||
returnValue: _i3.Future<int>.value(0),
|
||||
) as _i3.Future<int>);
|
||||
@override
|
||||
_i3.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#refreshWallets,
|
||||
[shouldNotifyListeners],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
void addListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
|
@ -226,7 +45,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
|
|
@ -4,15 +4,15 @@
|
|||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i5;
|
||||
import 'dart:ui' as _i8;
|
||||
import 'dart:ui' as _i7;
|
||||
|
||||
import 'package:barcode_scan2/barcode_scan2.dart' as _i2;
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:stackwallet/models/node_model.dart' as _i10;
|
||||
import 'package:stackwallet/services/node_service.dart' as _i9;
|
||||
import 'package:stackwallet/models/node_model.dart' as _i9;
|
||||
import 'package:stackwallet/services/node_service.dart' as _i8;
|
||||
import 'package:stackwallet/services/wallets_service.dart' as _i6;
|
||||
import 'package:stackwallet/utilities/barcode_scanner_interface.dart' as _i4;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i7;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i10;
|
||||
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'
|
||||
as _i3;
|
||||
|
||||
|
@ -94,187 +94,7 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i5.Future<bool> renameWallet({
|
||||
required String? from,
|
||||
required String? to,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#renameWallet,
|
||||
[],
|
||||
{
|
||||
#from: from,
|
||||
#to: to,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
) as _i5.Future<bool>);
|
||||
@override
|
||||
Map<String, _i6.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchWalletsData,
|
||||
[],
|
||||
),
|
||||
returnValue: <String, _i6.WalletInfo>{},
|
||||
) as Map<String, _i6.WalletInfo>);
|
||||
@override
|
||||
_i5.Future<void> addExistingStackWallet({
|
||||
required String? name,
|
||||
required String? walletId,
|
||||
required _i7.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addExistingStackWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#walletId: walletId,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
@override
|
||||
_i5.Future<String?> addNewWallet({
|
||||
required String? name,
|
||||
required _i7.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNewWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<String?>.value(),
|
||||
) as _i5.Future<String?>);
|
||||
@override
|
||||
_i5.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getFavoriteWalletIds,
|
||||
[],
|
||||
),
|
||||
returnValue: _i5.Future<List<String>>.value(<String>[]),
|
||||
) as _i5.Future<List<String>>);
|
||||
@override
|
||||
_i5.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#saveFavoriteWalletIds,
|
||||
[walletIds],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
@override
|
||||
_i5.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
@override
|
||||
_i5.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
@override
|
||||
_i5.Future<void> moveFavorite({
|
||||
required int? fromIndex,
|
||||
required int? toIndex,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#moveFavorite,
|
||||
[],
|
||||
{
|
||||
#fromIndex: fromIndex,
|
||||
#toIndex: toIndex,
|
||||
},
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
@override
|
||||
_i5.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#checkForDuplicate,
|
||||
[name],
|
||||
),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
) as _i5.Future<bool>);
|
||||
@override
|
||||
_i5.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getWalletId,
|
||||
[walletName],
|
||||
),
|
||||
returnValue: _i5.Future<String?>.value(),
|
||||
) as _i5.Future<String?>);
|
||||
@override
|
||||
_i5.Future<bool> isMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#isMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i5.Future<bool>.value(false),
|
||||
) as _i5.Future<bool>);
|
||||
@override
|
||||
_i5.Future<void> setMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
@override
|
||||
_i5.Future<int> deleteWallet(
|
||||
String? name,
|
||||
bool? shouldNotifyListeners,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteWallet,
|
||||
[
|
||||
name,
|
||||
shouldNotifyListeners,
|
||||
],
|
||||
),
|
||||
returnValue: _i5.Future<int>.value(0),
|
||||
) as _i5.Future<int>);
|
||||
@override
|
||||
_i5.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#refreshWallets,
|
||||
[shouldNotifyListeners],
|
||||
),
|
||||
returnValue: _i5.Future<void>.value(),
|
||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
@override
|
||||
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i7.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
|
@ -282,7 +102,7 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
@ -310,7 +130,7 @@ class MockWalletsService extends _i1.Mock implements _i6.WalletsService {
|
|||
/// A class which mocks [NodeService].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockNodeService extends _i1.Mock implements _i9.NodeService {
|
||||
class MockNodeService extends _i1.Mock implements _i8.NodeService {
|
||||
@override
|
||||
_i3.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod(
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
|
@ -320,15 +140,15 @@ class MockNodeService extends _i1.Mock implements _i9.NodeService {
|
|||
),
|
||||
) as _i3.SecureStorageInterface);
|
||||
@override
|
||||
List<_i10.NodeModel> get primaryNodes => (super.noSuchMethod(
|
||||
List<_i9.NodeModel> get primaryNodes => (super.noSuchMethod(
|
||||
Invocation.getter(#primaryNodes),
|
||||
returnValue: <_i10.NodeModel>[],
|
||||
) as List<_i10.NodeModel>);
|
||||
returnValue: <_i9.NodeModel>[],
|
||||
) as List<_i9.NodeModel>);
|
||||
@override
|
||||
List<_i10.NodeModel> get nodes => (super.noSuchMethod(
|
||||
List<_i9.NodeModel> get nodes => (super.noSuchMethod(
|
||||
Invocation.getter(#nodes),
|
||||
returnValue: <_i10.NodeModel>[],
|
||||
) as List<_i10.NodeModel>);
|
||||
returnValue: <_i9.NodeModel>[],
|
||||
) as List<_i9.NodeModel>);
|
||||
@override
|
||||
bool get hasListeners => (super.noSuchMethod(
|
||||
Invocation.getter(#hasListeners),
|
||||
|
@ -345,8 +165,8 @@ class MockNodeService extends _i1.Mock implements _i9.NodeService {
|
|||
) as _i5.Future<void>);
|
||||
@override
|
||||
_i5.Future<void> setPrimaryNodeFor({
|
||||
required _i7.Coin? coin,
|
||||
required _i10.NodeModel? node,
|
||||
required _i10.Coin? coin,
|
||||
required _i9.NodeModel? node,
|
||||
bool? shouldNotifyListeners = false,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
|
@ -363,40 +183,40 @@ class MockNodeService extends _i1.Mock implements _i9.NodeService {
|
|||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
@override
|
||||
_i10.NodeModel? getPrimaryNodeFor({required _i7.Coin? coin}) =>
|
||||
_i9.NodeModel? getPrimaryNodeFor({required _i10.Coin? coin}) =>
|
||||
(super.noSuchMethod(Invocation.method(
|
||||
#getPrimaryNodeFor,
|
||||
[],
|
||||
{#coin: coin},
|
||||
)) as _i10.NodeModel?);
|
||||
)) as _i9.NodeModel?);
|
||||
@override
|
||||
List<_i10.NodeModel> getNodesFor(_i7.Coin? coin) => (super.noSuchMethod(
|
||||
List<_i9.NodeModel> getNodesFor(_i10.Coin? coin) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getNodesFor,
|
||||
[coin],
|
||||
),
|
||||
returnValue: <_i10.NodeModel>[],
|
||||
) as List<_i10.NodeModel>);
|
||||
returnValue: <_i9.NodeModel>[],
|
||||
) as List<_i9.NodeModel>);
|
||||
@override
|
||||
_i10.NodeModel? getNodeById({required String? id}) =>
|
||||
_i9.NodeModel? getNodeById({required String? id}) =>
|
||||
(super.noSuchMethod(Invocation.method(
|
||||
#getNodeById,
|
||||
[],
|
||||
{#id: id},
|
||||
)) as _i10.NodeModel?);
|
||||
)) as _i9.NodeModel?);
|
||||
@override
|
||||
List<_i10.NodeModel> failoverNodesFor({required _i7.Coin? coin}) =>
|
||||
List<_i9.NodeModel> failoverNodesFor({required _i10.Coin? coin}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#failoverNodesFor,
|
||||
[],
|
||||
{#coin: coin},
|
||||
),
|
||||
returnValue: <_i10.NodeModel>[],
|
||||
) as List<_i10.NodeModel>);
|
||||
returnValue: <_i9.NodeModel>[],
|
||||
) as List<_i9.NodeModel>);
|
||||
@override
|
||||
_i5.Future<void> add(
|
||||
_i10.NodeModel? node,
|
||||
_i9.NodeModel? node,
|
||||
String? password,
|
||||
bool? shouldNotifyListeners,
|
||||
) =>
|
||||
|
@ -448,7 +268,7 @@ class MockNodeService extends _i1.Mock implements _i9.NodeService {
|
|||
) as _i5.Future<void>);
|
||||
@override
|
||||
_i5.Future<void> edit(
|
||||
_i10.NodeModel? editedNode,
|
||||
_i9.NodeModel? editedNode,
|
||||
String? password,
|
||||
bool? shouldNotifyListeners,
|
||||
) =>
|
||||
|
@ -474,7 +294,7 @@ class MockNodeService extends _i1.Mock implements _i9.NodeService {
|
|||
returnValueForMissingStub: _i5.Future<void>.value(),
|
||||
) as _i5.Future<void>);
|
||||
@override
|
||||
void addListener(_i8.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i7.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
|
@ -482,7 +302,7 @@ class MockNodeService extends _i1.Mock implements _i9.NodeService {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
|
|
@ -4,11 +4,10 @@
|
|||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i3;
|
||||
import 'dart:ui' as _i5;
|
||||
import 'dart:ui' as _i4;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:stackwallet/services/wallets_service.dart' as _i2;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
|
@ -38,187 +37,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i3.Future<bool> renameWallet({
|
||||
required String? from,
|
||||
required String? to,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#renameWallet,
|
||||
[],
|
||||
{
|
||||
#from: from,
|
||||
#to: to,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
Map<String, _i2.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchWalletsData,
|
||||
[],
|
||||
),
|
||||
returnValue: <String, _i2.WalletInfo>{},
|
||||
) as Map<String, _i2.WalletInfo>);
|
||||
@override
|
||||
_i3.Future<void> addExistingStackWallet({
|
||||
required String? name,
|
||||
required String? walletId,
|
||||
required _i4.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addExistingStackWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#walletId: walletId,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<String?> addNewWallet({
|
||||
required String? name,
|
||||
required _i4.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNewWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<String?>.value(),
|
||||
) as _i3.Future<String?>);
|
||||
@override
|
||||
_i3.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getFavoriteWalletIds,
|
||||
[],
|
||||
),
|
||||
returnValue: _i3.Future<List<String>>.value(<String>[]),
|
||||
) as _i3.Future<List<String>>);
|
||||
@override
|
||||
_i3.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#saveFavoriteWalletIds,
|
||||
[walletIds],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> moveFavorite({
|
||||
required int? fromIndex,
|
||||
required int? toIndex,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#moveFavorite,
|
||||
[],
|
||||
{
|
||||
#fromIndex: fromIndex,
|
||||
#toIndex: toIndex,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#checkForDuplicate,
|
||||
[name],
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
_i3.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getWalletId,
|
||||
[walletName],
|
||||
),
|
||||
returnValue: _i3.Future<String?>.value(),
|
||||
) as _i3.Future<String?>);
|
||||
@override
|
||||
_i3.Future<bool> isMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#isMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
_i3.Future<void> setMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<int> deleteWallet(
|
||||
String? name,
|
||||
bool? shouldNotifyListeners,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteWallet,
|
||||
[
|
||||
name,
|
||||
shouldNotifyListeners,
|
||||
],
|
||||
),
|
||||
returnValue: _i3.Future<int>.value(0),
|
||||
) as _i3.Future<int>);
|
||||
@override
|
||||
_i3.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#refreshWallets,
|
||||
[shouldNotifyListeners],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
void addListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
|
@ -226,7 +45,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
|
|
@ -4,11 +4,10 @@
|
|||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i3;
|
||||
import 'dart:ui' as _i5;
|
||||
import 'dart:ui' as _i4;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:stackwallet/services/wallets_service.dart' as _i2;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
|
@ -38,187 +37,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i3.Future<bool> renameWallet({
|
||||
required String? from,
|
||||
required String? to,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#renameWallet,
|
||||
[],
|
||||
{
|
||||
#from: from,
|
||||
#to: to,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
Map<String, _i2.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchWalletsData,
|
||||
[],
|
||||
),
|
||||
returnValue: <String, _i2.WalletInfo>{},
|
||||
) as Map<String, _i2.WalletInfo>);
|
||||
@override
|
||||
_i3.Future<void> addExistingStackWallet({
|
||||
required String? name,
|
||||
required String? walletId,
|
||||
required _i4.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addExistingStackWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#walletId: walletId,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<String?> addNewWallet({
|
||||
required String? name,
|
||||
required _i4.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNewWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<String?>.value(),
|
||||
) as _i3.Future<String?>);
|
||||
@override
|
||||
_i3.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getFavoriteWalletIds,
|
||||
[],
|
||||
),
|
||||
returnValue: _i3.Future<List<String>>.value(<String>[]),
|
||||
) as _i3.Future<List<String>>);
|
||||
@override
|
||||
_i3.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#saveFavoriteWalletIds,
|
||||
[walletIds],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> moveFavorite({
|
||||
required int? fromIndex,
|
||||
required int? toIndex,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#moveFavorite,
|
||||
[],
|
||||
{
|
||||
#fromIndex: fromIndex,
|
||||
#toIndex: toIndex,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#checkForDuplicate,
|
||||
[name],
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
_i3.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getWalletId,
|
||||
[walletName],
|
||||
),
|
||||
returnValue: _i3.Future<String?>.value(),
|
||||
) as _i3.Future<String?>);
|
||||
@override
|
||||
_i3.Future<bool> isMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#isMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
_i3.Future<void> setMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<int> deleteWallet(
|
||||
String? name,
|
||||
bool? shouldNotifyListeners,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteWallet,
|
||||
[
|
||||
name,
|
||||
shouldNotifyListeners,
|
||||
],
|
||||
),
|
||||
returnValue: _i3.Future<int>.value(0),
|
||||
) as _i3.Future<int>);
|
||||
@override
|
||||
_i3.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#refreshWallets,
|
||||
[shouldNotifyListeners],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
void addListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
|
@ -226,7 +45,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
|
|
@ -4,11 +4,10 @@
|
|||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i3;
|
||||
import 'dart:ui' as _i5;
|
||||
import 'dart:ui' as _i4;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:stackwallet/services/wallets_service.dart' as _i2;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
|
@ -38,187 +37,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i3.Future<bool> renameWallet({
|
||||
required String? from,
|
||||
required String? to,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#renameWallet,
|
||||
[],
|
||||
{
|
||||
#from: from,
|
||||
#to: to,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
Map<String, _i2.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchWalletsData,
|
||||
[],
|
||||
),
|
||||
returnValue: <String, _i2.WalletInfo>{},
|
||||
) as Map<String, _i2.WalletInfo>);
|
||||
@override
|
||||
_i3.Future<void> addExistingStackWallet({
|
||||
required String? name,
|
||||
required String? walletId,
|
||||
required _i4.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addExistingStackWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#walletId: walletId,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<String?> addNewWallet({
|
||||
required String? name,
|
||||
required _i4.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNewWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<String?>.value(),
|
||||
) as _i3.Future<String?>);
|
||||
@override
|
||||
_i3.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getFavoriteWalletIds,
|
||||
[],
|
||||
),
|
||||
returnValue: _i3.Future<List<String>>.value(<String>[]),
|
||||
) as _i3.Future<List<String>>);
|
||||
@override
|
||||
_i3.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#saveFavoriteWalletIds,
|
||||
[walletIds],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> moveFavorite({
|
||||
required int? fromIndex,
|
||||
required int? toIndex,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#moveFavorite,
|
||||
[],
|
||||
{
|
||||
#fromIndex: fromIndex,
|
||||
#toIndex: toIndex,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#checkForDuplicate,
|
||||
[name],
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
_i3.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getWalletId,
|
||||
[walletName],
|
||||
),
|
||||
returnValue: _i3.Future<String?>.value(),
|
||||
) as _i3.Future<String?>);
|
||||
@override
|
||||
_i3.Future<bool> isMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#isMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
_i3.Future<void> setMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<int> deleteWallet(
|
||||
String? name,
|
||||
bool? shouldNotifyListeners,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteWallet,
|
||||
[
|
||||
name,
|
||||
shouldNotifyListeners,
|
||||
],
|
||||
),
|
||||
returnValue: _i3.Future<int>.value(0),
|
||||
) as _i3.Future<int>);
|
||||
@override
|
||||
_i3.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#refreshWallets,
|
||||
[shouldNotifyListeners],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
void addListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
|
@ -226,7 +45,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
|
|
@ -305,186 +305,6 @@ class MockWalletsService extends _i1.Mock implements _i9.WalletsService {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i4.Future<bool> renameWallet({
|
||||
required String? from,
|
||||
required String? to,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#renameWallet,
|
||||
[],
|
||||
{
|
||||
#from: from,
|
||||
#to: to,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
) as _i4.Future<bool>);
|
||||
@override
|
||||
Map<String, _i9.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchWalletsData,
|
||||
[],
|
||||
),
|
||||
returnValue: <String, _i9.WalletInfo>{},
|
||||
) as Map<String, _i9.WalletInfo>);
|
||||
@override
|
||||
_i4.Future<void> addExistingStackWallet({
|
||||
required String? name,
|
||||
required String? walletId,
|
||||
required _i5.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addExistingStackWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#walletId: walletId,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<String?> addNewWallet({
|
||||
required String? name,
|
||||
required _i5.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNewWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<String?>.value(),
|
||||
) as _i4.Future<String?>);
|
||||
@override
|
||||
_i4.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getFavoriteWalletIds,
|
||||
[],
|
||||
),
|
||||
returnValue: _i4.Future<List<String>>.value(<String>[]),
|
||||
) as _i4.Future<List<String>>);
|
||||
@override
|
||||
_i4.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#saveFavoriteWalletIds,
|
||||
[walletIds],
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<void> moveFavorite({
|
||||
required int? fromIndex,
|
||||
required int? toIndex,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#moveFavorite,
|
||||
[],
|
||||
{
|
||||
#fromIndex: fromIndex,
|
||||
#toIndex: toIndex,
|
||||
},
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#checkForDuplicate,
|
||||
[name],
|
||||
),
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
) as _i4.Future<bool>);
|
||||
@override
|
||||
_i4.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getWalletId,
|
||||
[walletName],
|
||||
),
|
||||
returnValue: _i4.Future<String?>.value(),
|
||||
) as _i4.Future<String?>);
|
||||
@override
|
||||
_i4.Future<bool> isMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#isMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i4.Future<bool>.value(false),
|
||||
) as _i4.Future<bool>);
|
||||
@override
|
||||
_i4.Future<void> setMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
_i4.Future<int> deleteWallet(
|
||||
String? name,
|
||||
bool? shouldNotifyListeners,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteWallet,
|
||||
[
|
||||
name,
|
||||
shouldNotifyListeners,
|
||||
],
|
||||
),
|
||||
returnValue: _i4.Future<int>.value(0),
|
||||
) as _i4.Future<int>);
|
||||
@override
|
||||
_i4.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#refreshWallets,
|
||||
[shouldNotifyListeners],
|
||||
),
|
||||
returnValue: _i4.Future<void>.value(),
|
||||
returnValueForMissingStub: _i4.Future<void>.value(),
|
||||
) as _i4.Future<void>);
|
||||
@override
|
||||
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
|
|
|
@ -4,11 +4,10 @@
|
|||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i3;
|
||||
import 'dart:ui' as _i5;
|
||||
import 'dart:ui' as _i4;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:stackwallet/services/wallets_service.dart' as _i2;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i4;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
|
@ -38,187 +37,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService {
|
|||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i3.Future<bool> renameWallet({
|
||||
required String? from,
|
||||
required String? to,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#renameWallet,
|
||||
[],
|
||||
{
|
||||
#from: from,
|
||||
#to: to,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
Map<String, _i2.WalletInfo> fetchWalletsData() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#fetchWalletsData,
|
||||
[],
|
||||
),
|
||||
returnValue: <String, _i2.WalletInfo>{},
|
||||
) as Map<String, _i2.WalletInfo>);
|
||||
@override
|
||||
_i3.Future<void> addExistingStackWallet({
|
||||
required String? name,
|
||||
required String? walletId,
|
||||
required _i4.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addExistingStackWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#walletId: walletId,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<String?> addNewWallet({
|
||||
required String? name,
|
||||
required _i4.Coin? coin,
|
||||
required bool? shouldNotifyListeners,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNewWallet,
|
||||
[],
|
||||
{
|
||||
#name: name,
|
||||
#coin: coin,
|
||||
#shouldNotifyListeners: shouldNotifyListeners,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<String?>.value(),
|
||||
) as _i3.Future<String?>);
|
||||
@override
|
||||
_i3.Future<List<String>> getFavoriteWalletIds() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getFavoriteWalletIds,
|
||||
[],
|
||||
),
|
||||
returnValue: _i3.Future<List<String>>.value(<String>[]),
|
||||
) as _i3.Future<List<String>>);
|
||||
@override
|
||||
_i3.Future<void> saveFavoriteWalletIds(List<String>? walletIds) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#saveFavoriteWalletIds,
|
||||
[walletIds],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> addFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> removeFavorite(String? walletId) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeFavorite,
|
||||
[walletId],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> moveFavorite({
|
||||
required int? fromIndex,
|
||||
required int? toIndex,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#moveFavorite,
|
||||
[],
|
||||
{
|
||||
#fromIndex: fromIndex,
|
||||
#toIndex: toIndex,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<bool> checkForDuplicate(String? name) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#checkForDuplicate,
|
||||
[name],
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
_i3.Future<String?> getWalletId(String? walletName) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getWalletId,
|
||||
[walletName],
|
||||
),
|
||||
returnValue: _i3.Future<String?>.value(),
|
||||
) as _i3.Future<String?>);
|
||||
@override
|
||||
_i3.Future<bool> isMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#isMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i3.Future<bool>.value(false),
|
||||
) as _i3.Future<bool>);
|
||||
@override
|
||||
_i3.Future<void> setMnemonicVerified({required String? walletId}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#setMnemonicVerified,
|
||||
[],
|
||||
{#walletId: walletId},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<int> deleteWallet(
|
||||
String? name,
|
||||
bool? shouldNotifyListeners,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteWallet,
|
||||
[
|
||||
name,
|
||||
shouldNotifyListeners,
|
||||
],
|
||||
),
|
||||
returnValue: _i3.Future<int>.value(0),
|
||||
) as _i3.Future<int>);
|
||||
@override
|
||||
_i3.Future<void> refreshWallets(bool? shouldNotifyListeners) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#refreshWallets,
|
||||
[shouldNotifyListeners],
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
void addListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addListener,
|
||||
[listener],
|
||||
|
@ -226,7 +45,7 @@ class MockWalletsService extends _i1.Mock implements _i2.WalletsService {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i4.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#removeListener,
|
||||
[listener],
|
||||
|
|
|
@ -1,182 +0,0 @@
|
|||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:hive_test/hive_test.dart';
|
||||
import 'package:mockito/annotations.dart';
|
||||
import 'package:stackwallet/db/hive/db.dart';
|
||||
import 'package:stackwallet/services/wallets_service.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart';
|
||||
|
||||
@GenerateMocks([SecureStorageWrapper])
|
||||
void main() {
|
||||
setUp(() async {
|
||||
await setUpTestHive();
|
||||
final wallets = await Hive.openBox<dynamic>(DB.boxNameAllWalletsData);
|
||||
await wallets.put('names', {
|
||||
"wallet_id": {
|
||||
"name": "My Firo Wallet",
|
||||
"id": "wallet_id",
|
||||
"coin": "bitcoin",
|
||||
},
|
||||
"wallet_id2": {
|
||||
"name": "wallet2",
|
||||
"id": "wallet_id2",
|
||||
"coin": "bitcoin",
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
test("get walletNames", () async {
|
||||
final service = WalletsService(secureStorageInterface: FakeSecureStorage());
|
||||
expect((await service.walletNames).toString(),
|
||||
'{wallet_id: WalletInfo: {"name":"My Firo Wallet","id":"wallet_id","coin":"bitcoin"}, wallet_id2: WalletInfo: {"name":"wallet2","id":"wallet_id2","coin":"bitcoin"}}');
|
||||
});
|
||||
|
||||
test("get null wallet names", () async {
|
||||
final wallets = await Hive.openBox<dynamic>('wallets');
|
||||
await wallets.put('names', null);
|
||||
final service = WalletsService(secureStorageInterface: FakeSecureStorage());
|
||||
expect(await service.walletNames, <String, WalletInfo>{});
|
||||
expect((await service.walletNames).toString(), '{}');
|
||||
});
|
||||
|
||||
test("rename wallet to same name", () async {
|
||||
final service = WalletsService(secureStorageInterface: FakeSecureStorage());
|
||||
expect(
|
||||
await service.renameWallet(
|
||||
from: "My Firo Wallet",
|
||||
to: "My Firo Wallet",
|
||||
shouldNotifyListeners: false),
|
||||
true);
|
||||
expect((await service.walletNames).toString(),
|
||||
'{wallet_id: WalletInfo: {"name":"My Firo Wallet","id":"wallet_id","coin":"bitcoin"}, wallet_id2: WalletInfo: {"name":"wallet2","id":"wallet_id2","coin":"bitcoin"}}');
|
||||
});
|
||||
|
||||
test("rename wallet to new name", () async {
|
||||
final service = WalletsService(secureStorageInterface: FakeSecureStorage());
|
||||
expect(
|
||||
await service.renameWallet(
|
||||
from: "My Firo Wallet",
|
||||
to: "My New Wallet",
|
||||
shouldNotifyListeners: false),
|
||||
true);
|
||||
|
||||
expect((await service.walletNames).toString(),
|
||||
'{wallet_id: WalletInfo: {"name":"My New Wallet","id":"wallet_id","coin":"bitcoin"}, wallet_id2: WalletInfo: {"name":"wallet2","id":"wallet_id2","coin":"bitcoin"}}');
|
||||
});
|
||||
|
||||
test("attempt rename wallet to another existing name", () async {
|
||||
final service = WalletsService(secureStorageInterface: FakeSecureStorage());
|
||||
expect(
|
||||
await service.renameWallet(
|
||||
from: "My Firo Wallet",
|
||||
to: "wallet2",
|
||||
shouldNotifyListeners: false),
|
||||
false);
|
||||
expect((await service.walletNames).toString(),
|
||||
'{wallet_id: WalletInfo: {"name":"My Firo Wallet","id":"wallet_id","coin":"bitcoin"}, wallet_id2: WalletInfo: {"name":"wallet2","id":"wallet_id2","coin":"bitcoin"}}');
|
||||
});
|
||||
|
||||
test("add new wallet name", () async {
|
||||
final service = WalletsService(secureStorageInterface: FakeSecureStorage());
|
||||
expect(
|
||||
await service.addNewWallet(
|
||||
name: "wallet3", coin: Coin.bitcoin, shouldNotifyListeners: false),
|
||||
isA<String>());
|
||||
expect((await service.walletNames).length, 3);
|
||||
});
|
||||
|
||||
test("add duplicate wallet name fails", () async {
|
||||
final service = WalletsService(secureStorageInterface: FakeSecureStorage());
|
||||
expect(
|
||||
await service.addNewWallet(
|
||||
name: "wallet2", coin: Coin.bitcoin, shouldNotifyListeners: false),
|
||||
null);
|
||||
expect((await service.walletNames).length, 2);
|
||||
});
|
||||
|
||||
test("check for duplicates when null names", () async {
|
||||
final wallets = await Hive.openBox<dynamic>('wallets');
|
||||
await wallets.put('names', null);
|
||||
final service = WalletsService(secureStorageInterface: FakeSecureStorage());
|
||||
expect(await service.checkForDuplicate("anything"), false);
|
||||
});
|
||||
|
||||
test("check for duplicates when some names with no matches", () async {
|
||||
final service = WalletsService(secureStorageInterface: FakeSecureStorage());
|
||||
expect(await service.checkForDuplicate("anything"), false);
|
||||
});
|
||||
|
||||
test("check for duplicates when some names with a match", () async {
|
||||
final service = WalletsService(secureStorageInterface: FakeSecureStorage());
|
||||
expect(await service.checkForDuplicate("wallet2"), true);
|
||||
});
|
||||
|
||||
test("get existing wallet id", () async {
|
||||
final service = WalletsService(secureStorageInterface: FakeSecureStorage());
|
||||
expect(await service.getWalletId("wallet2"), "wallet_id2");
|
||||
});
|
||||
|
||||
test("get non existent wallet id", () async {
|
||||
final service = WalletsService(secureStorageInterface: FakeSecureStorage());
|
||||
await expectLater(await service.getWalletId("wallet 99"), null);
|
||||
});
|
||||
|
||||
// test("delete a wallet", () async {
|
||||
// await Hive.openBox<String>(DB.boxNameWalletsToDeleteOnStart);
|
||||
// await Hive.openBox<TradeWalletLookup>(DB.boxNameTradeLookup);
|
||||
// await Hive.openBox<NotificationModel>(DB.boxNameNotifications);
|
||||
// final secureStore = MockSecureStorageWrapper();
|
||||
//
|
||||
// when(secureStore.delete(key: "wallet_id_pin")).thenAnswer((_) async {});
|
||||
// when(secureStore.delete(key: "wallet_id_mnemonic"))
|
||||
// .thenAnswer((_) async {});
|
||||
//
|
||||
// final service = WalletsService(secureStorageInterface: secureStore);
|
||||
//
|
||||
// expect(await service.deleteWallet("My Firo Wallet", false), 0);
|
||||
// expect((await service.walletNames).length, 1);
|
||||
//
|
||||
// verify(secureStore.delete(key: "wallet_id_pin")).called(1);
|
||||
// verify(secureStore.delete(key: "wallet_id_mnemonic")).called(1);
|
||||
//
|
||||
// verifyNoMoreInteractions(secureStore);
|
||||
// });
|
||||
//
|
||||
// test("delete last wallet", () async {
|
||||
// await Hive.openBox<String>(DB.boxNameWalletsToDeleteOnStart);
|
||||
// await Hive.openBox<TradeWalletLookup>(DB.boxNameTradeLookup);
|
||||
// await Hive.openBox<NotificationModel>(DB.boxNameNotifications);
|
||||
// final wallets = await Hive.openBox<dynamic>('wallets');
|
||||
// await wallets.put('names', {
|
||||
// "wallet_id": {
|
||||
// "name": "My Firo Wallet",
|
||||
// "id": "wallet_id",
|
||||
// "coin": "bitcoin",
|
||||
// },
|
||||
// });
|
||||
// final secureStore = MockSecureStorageWrapper();
|
||||
//
|
||||
// when(secureStore.delete(key: "wallet_id_pin")).thenAnswer((_) async {});
|
||||
// when(secureStore.delete(key: "wallet_id_mnemonic"))
|
||||
// .thenAnswer((_) async {});
|
||||
//
|
||||
// final service = WalletsService(secureStorageInterface: secureStore);
|
||||
//
|
||||
// expect(await service.deleteWallet("My Firo Wallet", false), 2);
|
||||
// expect((await service.walletNames).length, 0);
|
||||
//
|
||||
// verify(secureStore.delete(key: "wallet_id_pin")).called(1);
|
||||
// verify(secureStore.delete(key: "wallet_id_mnemonic")).called(1);
|
||||
//
|
||||
// verifyNoMoreInteractions(secureStore);
|
||||
// });
|
||||
|
||||
// test("get", () async {
|
||||
// final service = WalletsService();
|
||||
// });
|
||||
|
||||
tearDown(() async {
|
||||
await tearDownTestHive();
|
||||
});
|
||||
}
|
|
@ -1,145 +0,0 @@
|
|||
// Mocks generated by Mockito 5.4.2 from annotations
|
||||
// in stackwallet/test/services/wallets_service_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i3;
|
||||
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart' as _i4;
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'
|
||||
as _i2;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
// ignore_for_file: avoid_setters_without_getters
|
||||
// ignore_for_file: comment_references
|
||||
// ignore_for_file: implementation_imports
|
||||
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: prefer_const_constructors
|
||||
// ignore_for_file: unnecessary_parenthesis
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
/// A class which mocks [SecureStorageWrapper].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockSecureStorageWrapper extends _i1.Mock
|
||||
implements _i2.SecureStorageWrapper {
|
||||
MockSecureStorageWrapper() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i3.Future<List<String>> get keys => (super.noSuchMethod(
|
||||
Invocation.getter(#keys),
|
||||
returnValue: _i3.Future<List<String>>.value(<String>[]),
|
||||
) as _i3.Future<List<String>>);
|
||||
@override
|
||||
_i3.Future<String?> read({
|
||||
required String? key,
|
||||
_i4.IOSOptions? iOptions,
|
||||
_i4.AndroidOptions? aOptions,
|
||||
_i4.LinuxOptions? lOptions,
|
||||
_i4.WebOptions? webOptions,
|
||||
_i4.MacOsOptions? mOptions,
|
||||
_i4.WindowsOptions? wOptions,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#read,
|
||||
[],
|
||||
{
|
||||
#key: key,
|
||||
#iOptions: iOptions,
|
||||
#aOptions: aOptions,
|
||||
#lOptions: lOptions,
|
||||
#webOptions: webOptions,
|
||||
#mOptions: mOptions,
|
||||
#wOptions: wOptions,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<String?>.value(),
|
||||
) as _i3.Future<String?>);
|
||||
@override
|
||||
_i3.Future<void> write({
|
||||
required String? key,
|
||||
required String? value,
|
||||
_i4.IOSOptions? iOptions,
|
||||
_i4.AndroidOptions? aOptions,
|
||||
_i4.LinuxOptions? lOptions,
|
||||
_i4.WebOptions? webOptions,
|
||||
_i4.MacOsOptions? mOptions,
|
||||
_i4.WindowsOptions? wOptions,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#write,
|
||||
[],
|
||||
{
|
||||
#key: key,
|
||||
#value: value,
|
||||
#iOptions: iOptions,
|
||||
#aOptions: aOptions,
|
||||
#lOptions: lOptions,
|
||||
#webOptions: webOptions,
|
||||
#mOptions: mOptions,
|
||||
#wOptions: wOptions,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> delete({
|
||||
required String? key,
|
||||
_i4.IOSOptions? iOptions,
|
||||
_i4.AndroidOptions? aOptions,
|
||||
_i4.LinuxOptions? lOptions,
|
||||
_i4.WebOptions? webOptions,
|
||||
_i4.MacOsOptions? mOptions,
|
||||
_i4.WindowsOptions? wOptions,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#delete,
|
||||
[],
|
||||
{
|
||||
#key: key,
|
||||
#iOptions: iOptions,
|
||||
#aOptions: aOptions,
|
||||
#lOptions: lOptions,
|
||||
#webOptions: webOptions,
|
||||
#mOptions: mOptions,
|
||||
#wOptions: wOptions,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
@override
|
||||
_i3.Future<void> deleteAll({
|
||||
_i4.IOSOptions? iOptions,
|
||||
_i4.AndroidOptions? aOptions,
|
||||
_i4.LinuxOptions? lOptions,
|
||||
_i4.WebOptions? webOptions,
|
||||
_i4.MacOsOptions? mOptions,
|
||||
_i4.WindowsOptions? wOptions,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#deleteAll,
|
||||
[],
|
||||
{
|
||||
#iOptions: iOptions,
|
||||
#aOptions: aOptions,
|
||||
#lOptions: lOptions,
|
||||
#webOptions: webOptions,
|
||||
#mOptions: mOptions,
|
||||
#wOptions: wOptions,
|
||||
},
|
||||
),
|
||||
returnValue: _i3.Future<void>.value(),
|
||||
returnValueForMissingStub: _i3.Future<void>.value(),
|
||||
) as _i3.Future<void>);
|
||||
}
|
Loading…
Reference in a new issue