mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +00:00
comment out broken code in swb desktop restore + clean up unused imports and linter errors in wow/monero tests
This commit is contained in:
parent
25cb7fa790
commit
b635f1663b
3 changed files with 21 additions and 59 deletions
|
@ -9,7 +9,7 @@ import 'package:stackwallet/notifications/show_flush_bar.dart';
|
|||
import 'package:stackwallet/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart';
|
||||
import 'package:stackwallet/pages/settings_views/global_settings_view/stack_backup_views/helpers/stack_file_system.dart';
|
||||
import 'package:stackwallet/pages/settings_views/global_settings_view/stack_backup_views/sub_views/stack_restore_progress_view.dart';
|
||||
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/backup_and_restore/restore_backup_dialog.dart';
|
||||
// import 'package:stackwallet/pages_desktop_specific/home/settings_menu/backup_and_restore/restore_backup_dialog.dart';
|
||||
import 'package:stackwallet/route_generator.dart';
|
||||
import 'package:stackwallet/utilities/assets.dart';
|
||||
import 'package:stackwallet/utilities/constants.dart';
|
||||
|
@ -49,14 +49,14 @@ class _RestoreFromFileViewState extends ConsumerState<RestoreFromFileView> {
|
|||
bool hidePassword = true;
|
||||
|
||||
Future<void> restoreBackupPopup(BuildContext context) async {
|
||||
await showDialog<dynamic>(
|
||||
context: context,
|
||||
useSafeArea: false,
|
||||
barrierDismissible: true,
|
||||
builder: (context) {
|
||||
return const RestoreBackupDialog();
|
||||
},
|
||||
);
|
||||
// await showDialog<dynamic>(
|
||||
// context: context,
|
||||
// useSafeArea: false,
|
||||
// barrierDismissible: true,
|
||||
// builder: (context) {
|
||||
// return const RestoreBackupDialog();
|
||||
// },
|
||||
// );
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -1,43 +1,27 @@
|
|||
import 'dart:async';
|
||||
import 'dart:core';
|
||||
import 'dart:core' as core;
|
||||
import 'dart:io';
|
||||
import 'dart:math';
|
||||
|
||||
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:mockito/mockito.dart';
|
||||
|
||||
import 'package:cw_core/monero_amount_format.dart';
|
||||
import 'package:cw_core/node.dart';
|
||||
import 'package:cw_core/pending_transaction.dart';
|
||||
import 'package:cw_core/unspent_coins_info.dart';
|
||||
import 'package:cw_core/wallet_base.dart';
|
||||
import 'package:cw_core/wallet_credentials.dart';
|
||||
import 'package:cw_core/wallet_info.dart';
|
||||
import 'package:cw_core/wallet_service.dart';
|
||||
import 'package:cw_core/wallet_type.dart';
|
||||
import 'package:cw_monero/api/wallet.dart';
|
||||
import 'package:cw_monero/api/wallet_manager.dart' as monero_wallet_manager;
|
||||
import 'package:cw_monero/pending_monero_transaction.dart';
|
||||
import 'package:cw_monero/monero_wallet.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_libmonero/core/key_service.dart';
|
||||
import 'package:flutter_libmonero/core/wallet_creation_service.dart';
|
||||
import 'package:flutter_libmonero/view_model/send/output.dart';
|
||||
import 'package:flutter_libmonero/monero/monero.dart';
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
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:path_provider/path_provider.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart';
|
||||
|
||||
import 'package:stackwallet/services/wallets.dart';
|
||||
|
||||
import 'dart:developer' as developer;
|
||||
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart';
|
||||
|
||||
// TODO trim down to the minimum imports above
|
||||
|
||||
|
@ -76,12 +60,6 @@ void main() async {
|
|||
dirPath: '');
|
||||
late WalletCredentials credentials;
|
||||
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
Directory appDir = (await getApplicationDocumentsDirectory());
|
||||
if (Platform.isIOS) {
|
||||
appDir = (await getLibraryDirectory());
|
||||
}
|
||||
|
||||
monero.onStartup();
|
||||
|
||||
bool hiveAdaptersRegistered = false;
|
||||
|
@ -101,7 +79,8 @@ void main() async {
|
|||
await wallets.put('currentWalletName', name);
|
||||
|
||||
_walletInfoSource = await Hive.openBox<WalletInfo>(WalletInfo.boxName);
|
||||
walletService = monero.createMoneroWalletService(_walletInfoSource);
|
||||
walletService = monero
|
||||
.createMoneroWalletService(_walletInfoSource as Box<WalletInfo>);
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
|
@ -1,38 +1,26 @@
|
|||
import 'dart:async';
|
||||
import 'dart:core';
|
||||
import 'dart:core' as core;
|
||||
import 'dart:io';
|
||||
import 'dart:math';
|
||||
|
||||
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:mockito/mockito.dart';
|
||||
|
||||
import 'package:cw_core/monero_amount_format.dart';
|
||||
import 'package:cw_core/node.dart';
|
||||
import 'package:cw_core/pending_transaction.dart';
|
||||
import 'package:cw_core/unspent_coins_info.dart';
|
||||
import 'package:cw_core/wallet_base.dart';
|
||||
import 'package:cw_core/wallet_credentials.dart';
|
||||
import 'package:cw_core/wallet_info.dart';
|
||||
import 'package:cw_core/wallet_service.dart';
|
||||
import 'package:cw_core/wallet_type.dart';
|
||||
import 'package:cw_wownero/api/wallet.dart';
|
||||
import 'package:cw_wownero/pending_wownero_transaction.dart';
|
||||
import 'package:cw_wownero/wownero_wallet.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_libmonero/core/key_service.dart';
|
||||
import 'package:flutter_libmonero/core/wallet_creation_service.dart';
|
||||
import 'package:flutter_libmonero/view_model/send/output.dart';
|
||||
import 'package:flutter_libmonero/wownero/wownero.dart';
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart';
|
||||
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:path_provider/path_provider.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart';
|
||||
|
||||
import 'wownero_wallet_test_data.dart';
|
||||
|
||||
|
@ -67,12 +55,6 @@ void main() async {
|
|||
dirPath: '');
|
||||
late WalletCredentials credentials;
|
||||
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
Directory appDir = (await getApplicationDocumentsDirectory());
|
||||
if (Platform.isIOS) {
|
||||
appDir = (await getLibraryDirectory());
|
||||
}
|
||||
|
||||
wownero.onStartup();
|
||||
|
||||
bool hiveAdaptersRegistered = false;
|
||||
|
@ -92,7 +74,8 @@ void main() async {
|
|||
await wallets.put('currentWalletName', name);
|
||||
|
||||
_walletInfoSource = await Hive.openBox<WalletInfo>(WalletInfo.boxName);
|
||||
walletService = wownero.createWowneroWalletService(_walletInfoSource);
|
||||
walletService = wownero
|
||||
.createWowneroWalletService(_walletInfoSource as Box<WalletInfo>);
|
||||
}
|
||||
|
||||
bool hasThrown = false;
|
||||
|
|
Loading…
Reference in a new issue