Skip to content
Snippets Groups Projects
Commit bde2b0cb authored by poka's avatar poka
Browse files

enh: remove p2p.legal indexer endpoint

parent 65b5a9f3
Branches
Tags
No related merge requests found
Pipeline #34528 waiting for manual action
[ [
"https://gdev-indexer.p2p.legal",
"https://hasura.gdev.coinduf.eu" "https://hasura.gdev.coinduf.eu"
] ]
...@@ -84,7 +84,8 @@ class DuniterIndexer with ChangeNotifier { ...@@ -84,7 +84,8 @@ class DuniterIndexer with ChangeNotifier {
return configBox.get('customIndexer'); return configBox.get('customIndexer');
} }
if (configBox.containsKey('indexerEndpoint')) { if (configBox.containsKey('indexerEndpoint') &&
listIndexerEndpoints.contains(configBox.get('indexerEndpoint'))) {
if (await checkIndexerEndpoint(configBox.get('indexerEndpoint'))) { if (await checkIndexerEndpoint(configBox.get('indexerEndpoint'))) {
return configBox.get('indexerEndpoint'); return configBox.get('indexerEndpoint');
} }
...@@ -98,7 +99,7 @@ class DuniterIndexer with ChangeNotifier { ...@@ -98,7 +99,7 @@ class DuniterIndexer with ChangeNotifier {
client.connectionTimeout = const Duration(milliseconds: 3000); client.connectionTimeout = const Duration(milliseconds: 3000);
do { do {
int listLenght = listIndexerEndpoints.length - 1; final listLenght = listIndexerEndpoints.length - 1;
if (i >= listLenght) { if (i >= listLenght) {
log.e('NO VALID INDEXER ENDPOINT FOUND'); log.e('NO VALID INDEXER ENDPOINT FOUND');
indexerEndpoint = ''; indexerEndpoint = '';
...@@ -111,7 +112,7 @@ class DuniterIndexer with ChangeNotifier { ...@@ -111,7 +112,7 @@ class DuniterIndexer with ChangeNotifier {
} }
try { try {
String endpointPath = '${listIndexerEndpoints[i]}/v1/graphql'; final endpointPath = '${listIndexerEndpoints[i]}/v1/graphql';
final request = await client.postUrl(Uri.parse(endpointPath)); final request = await client.postUrl(Uri.parse(endpointPath));
final response = await request.close(); final response = await request.close();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment