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

Calculate staked ratio before insert pools #1957

Merged
merged 6 commits into from
May 21, 2019
Merged

Calculate staked ratio before insert pools #1957

merged 6 commits into from
May 21, 2019

Conversation

saneery
Copy link
Contributor

@saneery saneery commented May 15, 2019

#1709

Motivation

We need to show a stakes ratio in the interface https://projects.invisionapp.com/share/YPQNPDTW4ZB#/screens/348397338
Stakes ratio is a ratio of a pool stakes amount to the total stakes amount

Changelog

Set the function to calculate the ratio in each pool from the fetched list.

Checklist for your PR

  • I added an entry to CHANGELOG.md with this PR
  • If I added new functionality, I added tests covering it.
  • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • I checked whether I should update the docs and did so if necessary

@ghost ghost assigned saneery May 15, 2019
@ghost ghost added the in progress label May 15, 2019
@coveralls
Copy link

coveralls commented May 15, 2019

Pull Request Test Coverage Report for Build 6865c179-c013-46de-926d-d52d18f2f01a

  • 7 of 7 (100.0%) changed or added relevant lines in 2 files are covered.
  • 10 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.1%) to 81.125%

Files with Coverage Reduction New Missed Lines %
apps/indexer/lib/indexer/fetcher/token.ex 1 78.57%
apps/indexer/lib/indexer/fetcher/token_balance.ex 2 87.1%
apps/indexer/lib/indexer/block/fetcher.ex 3 87.84%
apps/indexer/lib/indexer/block/catchup/fetcher.ex 4 69.23%
Totals Coverage Status
Change from base Build 17f65b6f-b33a-4dad-b400-ad1d5d8fd47d: -0.1%
Covered Lines: 4715
Relevant Lines: 5812

💛 - Coveralls

@vbaranov vbaranov merged commit 60ceb4b into master May 21, 2019
@vbaranov vbaranov deleted the stakes_ratio branch May 21, 2019 11:17
@goodsoft goodsoft mentioned this pull request Jul 4, 2019
47 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress ready for review This PR is ready for reviews.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants