From 0777db81c7ab16b588f679d5f5a1551879528487 Mon Sep 17 00:00:00 2001 From: Rafael Saes <git@rafael.saes.dev> Date: Tue, 9 Apr 2024 19:38:39 -0300 Subject: [PATCH] fix: red dot in non ssl nodes --- cw_core/lib/node.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cw_core/lib/node.dart b/cw_core/lib/node.dart index 585bc3c38..7e182623b 100644 --- a/cw_core/lib/node.dart +++ b/cw_core/lib/node.dart @@ -232,8 +232,12 @@ class Node extends HiveObject with Keyable { Future<bool> requestElectrumServer() async { try { - await SecureSocket.connect(uri.host, uri.port, - timeout: Duration(seconds: 5), onBadCertificate: (_) => true); + if (useSSL == true) { + await SecureSocket.connect(uri.host, uri.port, + timeout: Duration(seconds: 5), onBadCertificate: (_) => true); + } else { + await Socket.connect(uri.host, uri.port, timeout: Duration(seconds: 5)); + } return true; } catch (_) { return false;