Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetch coin gecko id based on coin symbol #2662

Merged
merged 7 commits into from
Sep 11, 2019

Conversation

ayrat555
Copy link
Contributor

@ayrat555 ayrat555 commented Sep 3, 2019

Coin Gecko provides API with all listed coins.
We can use this API to find coin id instead of setting
it by hand.

Changelog

  • fetch coin gecko id based on the coin symbol

Coin Gecko provides API with all listed coins.
We can use this API to  find coin id instead of setting
it by hand.
@coveralls
Copy link

coveralls commented Sep 3, 2019

Pull Request Test Coverage Report for Build 1a214014-d8f3-41a6-b637-b56f4580fe6a

  • 7 of 9 (77.78%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 78.395%

Changes Missing Coverage Covered Lines Changed/Added Lines %
apps/explorer/lib/explorer/exchange_rates/source/coin_gecko.ex 7 9 77.78%
Totals Coverage Status
Change from base Build b236cd4d-2a4b-448b-ae47-0656bf85e837: 0.05%
Covered Lines: 5167
Relevant Lines: 6591

💛 - Coveralls

@@ -18,6 +18,26 @@ defmodule Explorer.ExchangeRates.Source.CoinGeckoTest do
}
"""

@coins_list """
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ayrat555 let's add coins for all chains, that we support, to the tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@can you please list their coin symbols defined as COIN in env vars?

Copy link
Member

@vbaranov vbaranov Sep 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ETH, POA, RBTC, DAI, CLO

@ayrat555

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added tests for all supported chains

Copy link
Member

@vbaranov vbaranov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ayrat555 in case of RSK market cap is empty for some reason (COIN=RBTC):

Screenshot 2019-09-10 at 18 39 29

@ayrat555
Copy link
Contributor Author

@vbaranov rootstock market cap calculation uses records from db. I think your db was empty that's why it returned 0. on production it should be correc

@vbaranov vbaranov merged commit 088fd5f into master Sep 11, 2019
@vbaranov vbaranov deleted the ab-remove-coin-geck-id-env-var branch September 11, 2019 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants