partial reversion of previous commit

This commit is contained in:
sneurlax 2024-07-30 17:33:14 -05:00 committed by julian-CStack
parent 615fdfb5bf
commit b6dd28562b
2 changed files with 1 additions and 11 deletions

View file

@ -108,11 +108,6 @@ Future<MoneroNodeConnectionResponse> 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",

View file

@ -40,17 +40,12 @@ Future<bool> _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) {