do not stich json rpc config into module

pull/2690/head
Ayrat Badykov 5 years ago
parent 3ccbb1bc86
commit d0be04638b
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 4
      apps/explorer/lib/explorer/chain/cache/net_version.ex

@ -3,8 +3,6 @@ defmodule Explorer.Chain.Cache.NetVersion do
Caches chain version. Caches chain version.
""" """
@json_rpc_named_arguments Application.get_env(:explorer, :json_rpc_named_arguments)
require Logger require Logger
use Explorer.Chain.MapCache, use Explorer.Chain.MapCache,
@ -12,7 +10,7 @@ defmodule Explorer.Chain.Cache.NetVersion do
key: :version key: :version
defp handle_fallback(:version) do defp handle_fallback(:version) do
case EthereumJSONRPC.fetch_net_version(@json_rpc_named_arguments) do case EthereumJSONRPC.fetch_net_version(Application.get_env(:explorer, :json_rpc_named_arguments)) do
{:ok, value} -> {:ok, value} ->
{:update, value} {:update, value}

Loading…
Cancel
Save