Skip to content

Conversation

nidhi-singh02
Copy link
Contributor

@nidhi-singh02 nidhi-singh02 commented Oct 13, 2025

Summary

The menu does not show if the method is deprecated, indicating it clearly so users allows at a glance. This will enhance the developer experience.

Rationale

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code
image

@nidhi-singh02 nidhi-singh02 self-assigned this Oct 13, 2025
Copy link

vercel bot commented Oct 13, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
api-reference Ready Ready Preview Comment Oct 13, 2025 0:25am
6 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
component-library Skipped Skipped Oct 13, 2025 0:25am
developer-hub Skipped Skipped Oct 13, 2025 0:25am
entropy-explorer Skipped Skipped Oct 13, 2025 0:25am
insights Skipped Skipped Oct 13, 2025 0:25am
proposals Skipped Skipped Oct 13, 2025 0:25am
staking Skipped Skipped Oct 13, 2025 0:25am

**This function may return a price from arbitrarily far in the past.** It is the
caller's responsibility to check the returned \`publishTime\` to ensure that the
update is recent enough for their use case. If you need the latest price, update the price using [\`updatePriceFeeds()\`](updatePriceFeeds) and then call [\`getPrice()\`](getPrice).
update is recent enough for their use case. If you need the latest price, update the price using [\`updatePriceFeeds()\`](updatePriceFeeds) and then call [\`getPriceNoOlderThan()\`](getPriceNoOlderThan).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

calling the correct method.

Use this function if you want to use a Pyth price for a fixed time and not the most
recent price; otherwise, consider using [updatePriceFeeds](update-price-feeds)
followed by [getPrice](get-price) or one of its variants.
followed by [getPriceNoOlderThan](get-price-no-older-than) or one of its variants.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

calling the correct method.

name,
href: `/price-feeds/${chain}/${name}`,
Object.entries(methods).map(([methodKey, methodValue]) => ({
name: (methodValue as { name: string }).name,
Copy link
Member

Choose a reason for hiding this comment

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

What this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We want to show the exact method name in the menu as when you open a method (which includes deprecated) so modifying the name parameter.

I have attached the screenshot in the PR description to show how the menu will look with this changeset.

Copy link
Contributor

@KemarTiti KemarTiti left a comment

Choose a reason for hiding this comment

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

lgtm

@nidhi-singh02 nidhi-singh02 merged commit 69662fd into main Oct 14, 2025
10 checks passed
@nidhi-singh02 nidhi-singh02 deleted the api-ref-improvements branch October 14, 2025 09:47
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.

3 participants