diff --git a/lib/utilities/connection_check/electrum_connection_check.dart b/lib/utilities/connection_check/electrum_connection_check.dart index 480434ce3..85ff83511 100644 --- a/lib/utilities/connection_check/electrum_connection_check.dart +++ b/lib/utilities/connection_check/electrum_connection_check.dart @@ -47,16 +47,18 @@ Future checkElectrumServer({ final client = await ElectrumClient.connect( host: host, port: port, - useSSL: useSSL, + useSSL: useSSL && !host.endsWith('.onion'), proxyInfo: proxyInfo, ).timeout( - const Duration(seconds: 5), + Duration(seconds: (proxyInfo == null ? 5 : 30)), onTimeout: () => throw Exception( "The checkElectrumServer connect() call timed out.", ), ); - await client.ping().timeout(const Duration(seconds: 5)); + await client + .ping() + .timeout(Duration(seconds: (proxyInfo == null ? 5 : 30))); return true; } catch (_) {