From ec828642b6113e463cf7de06cc6e9c69c595267f Mon Sep 17 00:00:00 2001 From: aramalipoor Date: Thu, 20 Oct 2022 20:19:45 +0200 Subject: [PATCH] fix: fetch token states 500 at a time --- .../react-token-streams/src/hooks/useStreamTokensInCustody.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-token-streams/src/hooks/useStreamTokensInCustody.ts b/packages/react-token-streams/src/hooks/useStreamTokensInCustody.ts index 8b5e56a7..4133de3a 100644 --- a/packages/react-token-streams/src/hooks/useStreamTokensInCustody.ts +++ b/packages/react-token-streams/src/hooks/useStreamTokensInCustody.ts @@ -102,9 +102,9 @@ export const useStreamTokensInCustody = (config: Config) => { for ( let i = 0, l = Number(totalSupply?.toString() || 20000); i <= l; - i = i + 5000 + i = i + 500 ) { - const tokens = await fetchTokensInCustodyInRange(i, i + 5000); + const tokens = await fetchTokensInCustodyInRange(i, i + 500); if (tokens && tokens.length) { finalData.push(...tokens);