mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
fix: (ba)nano testNetworkConnection always returning false
This commit is contained in:
parent
479b0b333d
commit
cb1922d2c7
2 changed files with 8 additions and 18 deletions
|
@ -756,15 +756,10 @@ class BananoWallet extends CoinServiceAPI
|
|||
}
|
||||
|
||||
@override
|
||||
Future<bool> testNetworkConnection() {
|
||||
http
|
||||
.get(Uri.parse("${getCurrentNode().host}?action=version"))
|
||||
.then((response) {
|
||||
if (response.statusCode == 200) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
return Future.value(false);
|
||||
Future<bool> testNetworkConnection() async {
|
||||
final uri = Uri.parse("${getCurrentNode().host}?action=version");
|
||||
final response = await http.get(uri);
|
||||
return response.statusCode == 200;
|
||||
}
|
||||
|
||||
Timer? _networkAliveTimer;
|
||||
|
|
|
@ -775,15 +775,10 @@ class NanoWallet extends CoinServiceAPI
|
|||
}
|
||||
|
||||
@override
|
||||
Future<bool> testNetworkConnection() {
|
||||
http
|
||||
.get(Uri.parse("${getCurrentNode().host}?action=version"))
|
||||
.then((response) {
|
||||
if (response.statusCode == 200) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
return Future.value(false);
|
||||
Future<bool> testNetworkConnection() async {
|
||||
final uri = Uri.parse("${getCurrentNode().host}?action=version");
|
||||
final response = await http.get(uri);
|
||||
return response.statusCode == 200;
|
||||
}
|
||||
|
||||
Timer? _networkAliveTimer;
|
||||
|
|
Loading…
Reference in a new issue