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;