From e5bd0580c7e0d5dddbc8eb2dbad6a17f72594590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danilo=20Ara=C3=BAjo=20Silva?= Date: Mon, 26 Aug 2024 19:58:27 -0300 Subject: [PATCH] Adding logs and disabling fetching orders from all markets when no market is informed. --- src/connectors/kujira/kujira.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/connectors/kujira/kujira.ts b/src/connectors/kujira/kujira.ts index 626c940b2a..0f6bb21584 100644 --- a/src/connectors/kujira/kujira.ts +++ b/src/connectors/kujira/kujira.ts @@ -1428,9 +1428,14 @@ export class Kujira { bundles, }); } else { + // TODO Handle better the case when no market is informed. The ideal is to fetch the orders only from the markets who have them!!! + // const marketIds = + // options.marketIds || + // (await this.getAllMarkets({}, this.network)).keySeq().toArray(); + const marketIds = options.marketIds || - (await this.getAllMarkets({}, this.network)).keySeq().toArray(); + []; orders = IMap().asMutable(); @@ -2199,6 +2204,9 @@ export class Kujira { latencies.sort((a, b) => a.latency - b.latency); + console.log('RPCs latencies:', latencies); + console.log(`Chosen RPC: ${latencies[0].endpoint}`); + return latencies[0].endpoint; }