Merge pull request #3089 from poanetwork/vb-coingecko-id

CoinGecko API coin id environment variable
pull/3091/head
Victor Baranov 5 years ago committed by GitHub
commit f82efc096c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 1
      apps/explorer/config/config.exs
  3. 9
      apps/explorer/lib/explorer/exchange_rates/source/coin_gecko.ex

@ -1,6 +1,7 @@
## Current
### Features
- [#3089](https://github.com/poanetwork/blockscout/pull/3089) - CoinGecko API coin id environment variable
- [#3069](https://github.com/poanetwork/blockscout/pull/3069) - Make a link to address page on decoded constructor argument of address type
- [#3067](https://github.com/poanetwork/blockscout/pull/3067) - Show proper title of the tile or container for token burnings/mintings instead of "Token Transfer"
- [#3066](https://github.com/poanetwork/blockscout/pull/3066) - ERC-721 token instance page: link to token added

@ -9,6 +9,7 @@ use Mix.Config
config :explorer,
ecto_repos: [Explorer.Repo],
coin: System.get_env("COIN") || "POA",
coingecko_coin_id: System.get_env("COINGECKO_COIN_ID"),
token_functions_reader_max_retries: 3,
allowed_evm_versions:
System.get_env("ALLOWED_EVM_VERSIONS") ||

@ -44,7 +44,14 @@ defmodule Explorer.ExchangeRates.Source.CoinGecko do
@impl Source
def source_url do
{:ok, id} = coin_id()
explicit_coin_id = Application.get_env(:explorer, :coingecko_coin_id)
{:ok, id} =
if explicit_coin_id do
{:ok, explicit_coin_id}
else
coin_id()
end
"#{base_url()}/coins/#{id}"
end

Loading…
Cancel
Save