fetch env without raise

pull/1855/head
saneery 6 years ago
parent 23b5355f23
commit 7e0f3cba33
  1. 4
      apps/explorer/lib/explorer/application.ex
  2. 4
      apps/explorer/lib/explorer/exchange_rates/exchange_rates.ex
  3. 4
      apps/explorer/lib/explorer/known_tokens/known_tokens.ex

@ -56,9 +56,7 @@ defmodule Explorer.Application do
end
defp should_start?(process) do
:explorer
|> Application.fetch_env!(process)
|> Keyword.fetch!(:enabled)
Application.get_env(:explorer, process, [])[:enabled] == true
end
defp configure(process) do

@ -135,8 +135,6 @@ defmodule Explorer.ExchangeRates do
end
defp enabled? do
:explorer
|> Application.fetch_env!(__MODULE__)
|> Keyword.fetch!(:enabled)
Application.get_env(:explorer, __MODULE__, [])[:enabled] == true
end
end

@ -134,8 +134,6 @@ defmodule Explorer.KnownTokens do
end
defp enabled? do
:explorer
|> Application.fetch_env!(__MODULE__)
|> Keyword.fetch!(:enabled)
Application.get_env(:explorer, __MODULE__, [])[:enabled] == true
end
end

Loading…
Cancel
Save