From 0e123f81563f7f8f07eb77f7379fef9d6728690d Mon Sep 17 00:00:00 2001 From: teodorus-nathaniel Date: Fri, 30 Aug 2024 23:57:49 +0700 Subject: [PATCH] Fix issue with ens rate limit --- src/pages/api/accounts-data.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pages/api/accounts-data.ts b/src/pages/api/accounts-data.ts index e326089c1..0c9af8afb 100644 --- a/src/pages/api/accounts-data.ts +++ b/src/pages/api/accounts-data.ts @@ -149,7 +149,12 @@ async function fetchAccountsData(addresses: string[], method: 'POST' | 'GET') { ) } - const domains = await getEnsNames(evmAddressesHuman) + let domains: Record = {} + try { + domains = await getEnsNames(evmAddressesHuman) + } catch (err) { + console.error('Error fetching ENS names', err) + } const needToFetchIdsPromise = addresses.map(async (address, i) => { const evmAddress = evmAddressesHuman[i]