Skip to content

Commit

Permalink
Merge pull request #243 from blockful-io/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
FrancoAguzzi authored Mar 19, 2024
2 parents 82b5de2 + cd8077b commit 80af73a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/client/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,11 @@ export const getAPIKeyForNetwork: Map<number, string | undefined> = new Map([
export const getCurrentNetworkHttpUrl = (chainId: number) => {
const httpUrl = getRpcHttpUrlForNetwork.get(chainId);

if (!httpUrl)
throw new Error(`No RPC URL was defined for chain ID: ${chainId}`);
if (!httpUrl) {
if (process.env.NODE_ENV === "production")
throw new Error(`No RPC URL was defined for chain ID: ${chainId}`);
else console.error(`No RPC URL was defined for chain ID: ${chainId}`);
}

return httpUrl;
};
Expand Down

0 comments on commit 80af73a

Please sign in to comment.