From 2da95410883343baca490bdac40acaf1e41efa4c Mon Sep 17 00:00:00 2001 From: osman sonmezturk Date: Mon, 26 Jun 2023 16:48:08 +0300 Subject: [PATCH] skip limit was adjusted --- src/util/calculators/pancakeswapV3subgraph.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/calculators/pancakeswapV3subgraph.ts b/src/util/calculators/pancakeswapV3subgraph.ts index 6856266a..9690040f 100644 --- a/src/util/calculators/pancakeswapV3subgraph.ts +++ b/src/util/calculators/pancakeswapV3subgraph.ts @@ -12,6 +12,7 @@ const TOKENS = gql` } } `; +const MAX_SKIP = 5000; /** * Gets TVL of Pancakeswap V3 using subgraph @@ -29,7 +30,7 @@ async function getTvlFromSubgraph( let skip = 0; - while (true) { + while (skip <= MAX_SKIP) { const requestResult = await request(endpoint, TOKENS, { block, skip,