mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-12 09:27:01 +00:00
add onion-specific test cases
cannot test onion node without proxyInfo and no need to test https for onion node
This commit is contained in:
parent
23c76b5034
commit
ecf56b21c0
1 changed files with 15 additions and 0 deletions
|
@ -41,6 +41,11 @@ Future<bool> _xmrHelper(
|
|||
|
||||
final uriString = "${uri.scheme}://${uri.host}:${port ?? 0}$path";
|
||||
|
||||
|
||||
if (proxyInfo == null && uri.host.endsWith(".onion")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final response = await testMoneroNodeConnection(
|
||||
Uri.parse(uriString),
|
||||
false,
|
||||
|
@ -131,6 +136,16 @@ 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