From 2907f7d96203f51e0d1313a6f1039a99ad284b3d Mon Sep 17 00:00:00 2001 From: sneurlax Date: Thu, 8 Aug 2024 14:55:53 -0500 Subject: [PATCH 1/4] silence print --- lib/utilities/test_monero_node_connection.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utilities/test_monero_node_connection.dart b/lib/utilities/test_monero_node_connection.dart index b1f590e41..aef26ba9a 100644 --- a/lib/utilities/test_monero_node_connection.dart +++ b/lib/utilities/test_monero_node_connection.dart @@ -150,7 +150,7 @@ Future testMoneroNodeConnection( final response = await request.close(); final result = await response.transform(utf8.decoder).join(); - print("HTTP Response: $result"); + // print("HTTP Response: $result"); final success = result.contains('"result":') && !result.contains('"error"'); From 7446a56631049f93371385e4e0d2364f2344cd28 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Thu, 8 Aug 2024 16:37:20 -0500 Subject: [PATCH 2/4] simplify test logic --- lib/utilities/test_node_connection.dart | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/lib/utilities/test_node_connection.dart b/lib/utilities/test_node_connection.dart index ec349445e..e3365eda8 100644 --- a/lib/utilities/test_node_connection.dart +++ b/lib/utilities/test_node_connection.dart @@ -114,7 +114,7 @@ Future testNodeConnection({ final url = formData.host!; final uri = Uri.tryParse(url); if (uri != null) { - if (!uri.hasScheme) { + if (!uri.hasScheme && !uri.host.endsWith(".onion")) { // try https first testPassed = await _xmrHelper( formData @@ -136,16 +136,6 @@ Future testNodeConnection({ proxyInfo, ); } - } else if (!uri.hasScheme && uri.host.endsWith(".onion")) { - // We can just test http for onion addresses. - testPassed = await _xmrHelper( - formData - ..host = url - ..useSSL = false, - context, - onSuccess, - proxyInfo, - ); } else { testPassed = await _xmrHelper( formData From e383c6202a36fac5efa9646917d734d5440ce576 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Sat, 10 Aug 2024 22:46:09 -0500 Subject: [PATCH 3/4] fix cw wallet restores from backup --- .../stack_backup_views/helpers/restore_create_backup.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart index 3dcdd45d5..58c4aaef1 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart @@ -486,7 +486,13 @@ abstract class SWB { privateKey: privateKey, ); - await wallet.init(); + if (wallet is MoneroWallet /*|| wallet is WowneroWallet doesn't work.*/) { + await wallet.init(isRestore: true); + } else if (wallet is WowneroWallet) { + await wallet.init(isRestore: true); + } else { + await wallet.init(); + } int restoreHeight = walletbackup['restoreHeight'] as int? ?? 0; if (restoreHeight <= 0) { From 67236147120ca35c837e10d2dafc6de6ff53a492 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Tue, 13 Aug 2024 15:52:50 -0500 Subject: [PATCH 4/4] add missing imports --- .../stack_backup_views/helpers/restore_create_backup.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart index 58c4aaef1..d0f964116 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart @@ -52,6 +52,8 @@ import '../../../../../wallets/isar/models/frost_wallet_info.dart'; import '../../../../../wallets/isar/models/wallet_info.dart'; import '../../../../../wallets/wallet/impl/bitcoin_frost_wallet.dart'; import '../../../../../wallets/wallet/impl/epiccash_wallet.dart'; +import '../../../../../wallets/wallet/impl/monero_wallet.dart'; +import '../../../../../wallets/wallet/impl/wownero_wallet.dart'; import '../../../../../wallets/wallet/wallet.dart'; import '../../../../../wallets/wallet/wallet_mixin_interfaces/cw_based_interface.dart'; import '../../../../../wallets/wallet/wallet_mixin_interfaces/mnemonic_interface.dart';