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..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'; @@ -486,7 +488,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) { 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"'); 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