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

Pass $ alongside TVL #489 #202

Merged
merged 13 commits into from
Feb 5, 2025
Merged

Conversation

kirugan
Copy link
Contributor

@kirugan kirugan commented Jan 21, 2025

@kirugan kirugan marked this pull request as ready for review January 23, 2025 08:52
@jeremy-babylonlabs jeremy-babylonlabs self-requested a review January 24, 2025 04:32
Copy link
Contributor

@jeremy-babylonlabs jeremy-babylonlabs left a comment

Choose a reason for hiding this comment

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

Very nice job, can you update the swagger as well?

@gusin13
Copy link
Contributor

gusin13 commented Jan 24, 2025

i couldn't find issue 489 ticket, can you please refer me to the ticket or provide more context on the pr?

@jeremy-babylonlabs
Copy link
Contributor

This PR is related to the ticket @gusin13 did before on phase-1, which adds btcusd in the reaponse

@gusin13
Copy link
Contributor

gusin13 commented Jan 24, 2025

@jeremy-babylonlabs @jrwbabylonlab sorry i am bit confused, is this change to support /v1/stats but aren't we deprecating it?

even in that case shouldn't we simply cherry-pick the merge commit from this pr (in 0.3.x branch) and merge in main?

@jrwbabylonlab
Copy link
Collaborator

@jeremy-babylonlabs @jrwbabylonlab sorry i am bit confused, is this change to support /v1/stats but aren't we deprecating it?

even in that case shouldn't we simply cherry-pick the merge commit from this pr (in 0.3.x branch) and merge in main?

I think i left a comment somewhere in the PR, but couldn't find it anymore.
We no longer need it for phase-1. But does not harm to continue support it in the phase-1 endpoint.
The more important part of the PR here is ensure the price is reflected in one of the endpoint so that our FE can display it.
Maybe we made a wrong decision for phase-1 where we directly performed the $ calculation for tvl. What we could do is provide the conversion rate in a generic network information endpoint so that FE can do its own calculation which is more flexible.
@kirugan what u think?

@jrwbabylonlab
Copy link
Collaborator

jrwbabylonlab commented Jan 28, 2025

Apart from the above comments need to be addressed, recommend adding below two as well:

  1. Let's start adding tests. A simple set of API request & response test cover happy&unhappy path
  2. Ensure the endpoint is only available/accept requests if the config is set for the pricing

@gusin13
Copy link
Contributor

gusin13 commented Jan 30, 2025

Some suggestions -

  1. We can do the same changes we did in /v1/stats endpoint and copy them to /v2/stats, I think this is what @kirugan did when pr was opened for review. We can merge this change first to main.
  2. After this we can open separate tickets/prs if needed to make further improvements as needed.

@kirugan kirugan merged commit 601f451 into main Feb 5, 2025
14 checks passed
external_apis:
coinmarketcap:
api_key: ${COINMARKETCAP_API_KEY}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

need to setup during deployment

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