mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-15 16:12:16 +00:00
fix nano test connection in gui
This commit is contained in:
parent
f2a6660552
commit
a28e9151db
1 changed files with 19 additions and 2 deletions
|
@ -180,8 +180,25 @@ Future<bool> testNodeConnection({
|
|||
break;
|
||||
|
||||
case NanoCurrency():
|
||||
//TODO: check network/node
|
||||
throw UnimplementedError();
|
||||
try {
|
||||
final uri = Uri.parse(formData.host!);
|
||||
|
||||
final response = await HTTP().post(
|
||||
url: uri,
|
||||
headers: {"Content-Type": "application/json"},
|
||||
body: jsonEncode(
|
||||
{
|
||||
"action": "version",
|
||||
},
|
||||
),
|
||||
proxyInfo: ref.read(prefsChangeNotifierProvider).useTor
|
||||
? ref.read(pTorService).getProxyInfo()
|
||||
: null,
|
||||
);
|
||||
|
||||
testPassed = response.code == 200;
|
||||
} catch (_) {}
|
||||
break;
|
||||
|
||||
case Tezos():
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue