From e3acd57c2017fb9b6d974f46551471d3f372daa2 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Wed, 28 Oct 2020 15:46:55 +0300 Subject: [PATCH] Add EthereumJSONRPC.HTTP.HTTPoison.json_rpc function clause when URL is null --- CHANGELOG.md | 1 + apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/http/httpoison.ex | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8cf03d85b..6df3046148 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ - [#3335](https://github.com/poanetwork/blockscout/pull/3335) - MarketCap calculation: check that ETS tables exist before inserting new data or lookup from the table ### Chore +- [#3407](https://github.com/poanetwork/blockscout/pull/3407) - Add EthereumJSONRPC.HTTP.HTTPoison.json_rpc function clause when URL is null - [#3405](https://github.com/poanetwork/blockscout/pull/3405) - N/A instead of 0 for market cap if it is not fetched - [#3404](https://github.com/poanetwork/blockscout/pull/3404) - DISABLE_KNOWN_TOKENS env var - [#3403](https://github.com/poanetwork/blockscout/pull/3403) - Refactor Coingecko interaction diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/http/httpoison.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/http/httpoison.ex index 79274db1c7..c3e466419e 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/http/httpoison.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/http/httpoison.ex @@ -17,4 +17,6 @@ defmodule EthereumJSONRPC.HTTP.HTTPoison do {:error, reason} end end + + def json_rpc(url, _json, _options) when is_nil(url), do: {:error, "URL is nil"} end