Skip to content

Commit 69662fd

Browse files
Merge pull request #3127 from pyth-network/api-ref-improvements
enhancements(API reference): Indicate deprecated func clearly in the menu
2 parents 8c21ee7 + c624fcc commit 69662fd

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

apps/api-reference/src/apis/evm/get-price-unsafe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const getPriceUnsafe = readApi<"id">({
1010
1111
**This function may return a price from arbitrarily far in the past.** It is the
1212
caller's responsibility to check the returned \`publishTime\` to ensure that the
13-
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).
13+
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).
1414
1515
The price object contains the following fields:
1616
1. \`price\`: The latest price of the price feed.

apps/api-reference/src/apis/evm/parse-price-feed-updates.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const parsePriceFeedUpdates = writeApi<
2424
2525
Use this function if you want to use a Pyth price for a fixed time and not the most
2626
recent price; otherwise, consider using [updatePriceFeeds](update-price-feeds)
27-
followed by [getPrice](get-price) or one of its variants.
27+
followed by [getPriceNoOlderThan](get-price-no-older-than) or one of its variants.
2828
2929
Unlike [updatePriceFeeds](updatePriceFeeds), calling this function will **not** update the on-chain price.
3030

apps/api-reference/src/components/Sidebar/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ const CHAIN_TO_NAME = {
2323
const MENU = Object.fromEntries(
2424
Object.entries(apis).map(([chain, methods]) => [
2525
chain,
26-
Object.entries(methods).map(([name]) => ({
27-
name,
28-
href: `/price-feeds/${chain}/${name}`,
26+
Object.entries(methods).map(([methodKey, methodValue]) => ({
27+
name: (methodValue as { name: string }).name,
28+
href: `/price-feeds/${chain}/${methodKey}`,
2929
})),
3030
]),
3131
);

0 commit comments

Comments
 (0)