mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-12 09:27:01 +00:00
simplify test logic
This commit is contained in:
parent
2907f7d962
commit
7446a56631
1 changed files with 1 additions and 11 deletions
|
@ -114,7 +114,7 @@ Future<bool> testNodeConnection({
|
|||
final url = formData.host!;
|
||||
final uri = Uri.tryParse(url);
|
||||
if (uri != null) {
|
||||
if (!uri.hasScheme) {
|
||||
if (!uri.hasScheme && !uri.host.endsWith(".onion")) {
|
||||
// try https first
|
||||
testPassed = await _xmrHelper(
|
||||
formData
|
||||
|
@ -136,16 +136,6 @@ Future<bool> testNodeConnection({
|
|||
proxyInfo,
|
||||
);
|
||||
}
|
||||
} else if (!uri.hasScheme && uri.host.endsWith(".onion")) {
|
||||
// We can just test http for onion addresses.
|
||||
testPassed = await _xmrHelper(
|
||||
formData
|
||||
..host = url
|
||||
..useSSL = false,
|
||||
context,
|
||||
onSuccess,
|
||||
proxyInfo,
|
||||
);
|
||||
} else {
|
||||
testPassed = await _xmrHelper(
|
||||
formData
|
||||
|
|
Loading…
Reference in a new issue