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
|
@ -10,7 +10,7 @@ import 'package:nanodart/nanodart.dart';
|
|||
import 'package:cw_core/node.dart';
|
||||
import 'package:nanoutil/nanoutil.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:cw_nano/.secrets.g.dart' as secrets;
|
||||
import 'package:cw_nano/.secrets.g.dart' as nano_secrets;
|
||||
|
||||
class NanoClient {
|
||||
static const Map<String, String> CAKE_HEADERS = {
|
||||
|
@ -54,12 +54,14 @@ class NanoClient {
|
|||
}
|
||||
|
||||
Map<String, String> getHeaders() {
|
||||
if (_node!.uri == "https://rpc.nano.to") {
|
||||
return CAKE_HEADERS..addAll({
|
||||
"key": secrets.nano2ApiKey,
|
||||
});
|
||||
final headers = Map<String, String>.from(CAKE_HEADERS);
|
||||
if (_node!.uri.host == "rpc.nano.to") {
|
||||
headers["key"] = nano_secrets.nano2ApiKey;
|
||||
}
|
||||
return CAKE_HEADERS;
|
||||
if (_node!.uri.host == "nano.nownodes.io") {
|
||||
headers["api-key"] = nano_secrets.nanoNowNodesApiKey;
|
||||
}
|
||||
return headers;
|
||||
}
|
||||
|
||||
Future<NanoBalance> getBalance(String address) async {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue