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

hotfix: use current circulating STX tokens for stx_supply endpoint #2092

Merged
merged 6 commits into from
Sep 27, 2024

Conversation

zone117x
Copy link
Member

@zone117x zone117x commented Sep 26, 2024

See https://www.notion.so/hiropbc/Total-supply-endpoint-af38665d46184408b681e05bbaf1eda0

Use current total STX supply for total_stx field in /extended/v1/stx_supply endpoint, rather than the year 2050 estimate. The year 2050 estimated is specified in a new field.

Example old response:

{
  "unlocked_percent": "82.00",
  "total_stx": "1818000000.000000",
  "unlocked_stx": "1490741806.960600",
  "block_height": 167439
}

Example new response:

{
  "unlocked_percent": "100.00",
  "total_stx": "1490741806.960600",
  "total_stx_year_2050": "1818000000.000000",
  "unlocked_stx": "1490741806.960600",
  "block_height": 167439
}

Deprecate a few old/unused endpoints:

Copy link

github-actions bot commented Sep 26, 2024

Vercel deployment URL: https://stacks-blockchain-9rfx0vpri-hirosystems.vercel.app 🚀

Copy link
Collaborator

@rafaelcr rafaelcr left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

codecov bot commented Sep 26, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/api/routes/ws/channels/socket-io-channel.ts 50.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Member

@diwakergupta diwakergupta left a comment

Choose a reason for hiding this comment

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

minor comments, otherwise LGTM (pending any testing)

src/api/routes/stx-supply.ts Outdated Show resolved Hide resolved
src/api/routes/stx-supply.ts Outdated Show resolved Hide resolved
src/helpers.ts Show resolved Hide resolved
@zone117x zone117x merged commit 58cd8b2 into master Sep 27, 2024
27 checks passed
@zone117x zone117x deleted the fix/stx-supply branch September 27, 2024 13:59
@blockstack-devops
Copy link

🎉 This PR is included in version 8.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants