From c0d182cd0fc51eea923ed428538058b8b77e5c5e Mon Sep 17 00:00:00 2001 From: AugustoL Date: Wed, 13 Apr 2022 12:51:27 -0300 Subject: [PATCH] fix(utils/cache): dont use decimals in maxBlockPerFetch --- src/utils/cache.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/cache.ts b/src/utils/cache.ts index 52d7a12f90..9c79ef731d 100644 --- a/src/utils/cache.ts +++ b/src/utils/cache.ts @@ -42,7 +42,7 @@ export const getEvents = async function ( 'You cannot query logs for more than 100000 blocks at once.' ) > -1 ) { - maxBlocksPerFetch = maxBlocksPerFetch / 4; + maxBlocksPerFetch = Number((maxBlocksPerFetch / 4).toFixed(0)); to = from + 100000; console.error( 'You cannot query logs for more than 100000 blocks at once.' @@ -102,7 +102,7 @@ export const getRawEvents = async function ( 'You cannot query logs for more than 100000 blocks at once.' ) > -1 ) { - maxBlocksPerFetch = maxBlocksPerFetch / 4; + maxBlocksPerFetch = Number((maxBlocksPerFetch / 4).toFixed(0)); to = from + 100000; console.error( 'You cannot query logs for more than 100000 blocks at once.'