From b6dd28562b2695dba2debaa40abdd1d418155ada Mon Sep 17 00:00:00 2001 From: sneurlax Date: Tue, 30 Jul 2024 17:33:14 -0500 Subject: [PATCH] partial reversion of previous commit --- lib/utilities/test_monero_node_connection.dart | 5 ----- lib/utilities/test_node_connection.dart | 7 +------ 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/lib/utilities/test_monero_node_connection.dart b/lib/utilities/test_monero_node_connection.dart index ac014d08d..7af89f6d8 100644 --- a/lib/utilities/test_monero_node_connection.dart +++ b/lib/utilities/test_monero_node_connection.dart @@ -108,11 +108,6 @@ Future testMoneroNodeConnection( await socket.connect(); await socket.connectTo(uri.host, uri.port); - // If this is an onion node and connectTo didn't throw, it's a success. - // if (uri.host.endsWith(".onion")) { - // return MoneroNodeConnectionResponse(null, null, null, true); - // } - final body = utf8.encode( jsonEncode({ "jsonrpc": "2.0", diff --git a/lib/utilities/test_node_connection.dart b/lib/utilities/test_node_connection.dart index 6df915807..2160671db 100644 --- a/lib/utilities/test_node_connection.dart +++ b/lib/utilities/test_node_connection.dart @@ -40,17 +40,12 @@ Future _xmrHelper( final String path = uri.path.isEmpty ? "/json_rpc" : uri.path; final uriString = "${uri.scheme}://${uri.host}:${port ?? 0}$path"; - final uriString = uri.host.endsWith(".onion") - ? "${uri.toString()}:$port$path" - : uri.hasScheme - ? uri.toString() - : "${data.useSSL! ? "https" : "http"}://$url:$port$path"; final response = await testMoneroNodeConnection( Uri.parse(uriString), false, proxyInfo: proxyInfo, - ).timeout(Duration(seconds: proxyInfo != null ? 30 : 10)); + ); if (response.cert != null) { if (context.mounted) {