mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
update nano default node (#1408)
* update nano default node * fix node indicator * Update pr_test_build.yml * Update pr_test_build.yml * update default nano node for new wallets * support extra args on tool script * remove nano secrets from node.dart --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
parent
36eacd8698
commit
73492ad865
8 changed files with 75 additions and 88 deletions
|
@ -6,6 +6,7 @@ import 'package:hive/hive.dart';
|
|||
import 'package:cw_core/hive_type_ids.dart';
|
||||
import 'package:cw_core/wallet_type.dart';
|
||||
import 'package:http/io_client.dart' as ioc;
|
||||
|
||||
// import 'package:tor/tor.dart';
|
||||
|
||||
part 'node.g.dart';
|
||||
|
@ -148,7 +149,6 @@ class Node extends HiveObject with Keyable {
|
|||
return requestMoneroNode();
|
||||
case WalletType.nano:
|
||||
case WalletType.banano:
|
||||
return requestNanoNode();
|
||||
case WalletType.bitcoin:
|
||||
case WalletType.litecoin:
|
||||
case WalletType.bitcoinCash:
|
||||
|
@ -203,23 +203,6 @@ class Node extends HiveObject with Keyable {
|
|||
}
|
||||
}
|
||||
|
||||
Future<bool> requestNanoNode() async {
|
||||
http.Response response = await http.post(
|
||||
uri,
|
||||
headers: {'Content-type': 'application/json'},
|
||||
body: json.encode(
|
||||
{
|
||||
"action": "block_count",
|
||||
},
|
||||
),
|
||||
);
|
||||
if (response.statusCode == 200) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Future<bool> requestNodeWithProxy() async {
|
||||
if (!isValidProxyAddress /* && !Tor.instance.enabled*/) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue