From a525f4fecceaaa68165ef1135e24bb3cff848cf1 Mon Sep 17 00:00:00 2001 From: batphonghan Date: Wed, 18 Sep 2024 12:03:03 +0700 Subject: [PATCH] Fix pendle query --- adapters/kelp_gain_linea/src/lib/pendle.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/adapters/kelp_gain_linea/src/lib/pendle.ts b/adapters/kelp_gain_linea/src/lib/pendle.ts index e2df42de..3c10d775 100644 --- a/adapters/kelp_gain_linea/src/lib/pendle.ts +++ b/adapters/kelp_gain_linea/src/lib/pendle.ts @@ -12,7 +12,7 @@ export async function fetchAllPendleShare( blockNumber: number, timeStamp: number ) { - if (blockNumber <= PENDLE_START_BLOCK) { + if (blockNumber <= PENDLE_START_BLOCK || timeStamp < EARLIEST_TIME) { return []; } const dataSize = 20000; @@ -42,7 +42,6 @@ export async function fetchAllPendleShare( if (shares.length == 0) { throw new Error(`Empty share pendle BLOCK: ${blockNumber}`); } - throw new Error(`Empty share pendle BLOCK: ${blockNumber}`); return shares; }