From 9def4c7459da1cd56a474e0259dbc2322eeb2b9e Mon Sep 17 00:00:00 2001 From: vrtnd Date: Fri, 26 Jul 2024 11:42:56 +0300 Subject: [PATCH] fix mantle etherscan error --- src/helpers/etherscan.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/helpers/etherscan.ts b/src/helpers/etherscan.ts index 1947d70..218a331 100644 --- a/src/helpers/etherscan.ts +++ b/src/helpers/etherscan.ts @@ -54,6 +54,10 @@ export const getTxsBlockRangeEtherscan = async ( const endpoint = endpoints[chain]; const apiKey = apiKeys[chain]; let res; + if (!endpoint) { + console.error(`WARNING: No Etherscan endpoint found for chain ${chain}.`); + return []; + } if (!apiKey) { res = ( await retry(