Skip to content

Commit 5fbf06c

Browse files
committed
Merge branch 'main' of github.com:pyth-network/pyth-crosschain into tb/solana-receiver-js-sdk/post-twap-updates
2 parents 9474df5 + cc16040 commit 5fbf06c

File tree

76 files changed

+3595
-2452
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+3595
-2452
lines changed

apps/api-reference/jsx.d.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* This file only exists because in react 19, the JSX namespace was moved under
3+
* the React export. However, some libraries (e.g. react-markdown) still have
4+
* some things typed as `JSX.<Something>`. Until those libraries update to
5+
* import the namespace correctly, we'll need this declaration file in place to
6+
* expose JSX via the old global location.
7+
*/
8+
9+
import type { JSX as Jsx } from "react/jsx-runtime";
10+
11+
declare global {
12+
namespace JSX {
13+
type ElementClass = Jsx.ElementClass;
14+
type Element = Jsx.Element;
15+
type IntrinsicElements = Jsx.IntrinsicElements;
16+
}
17+
}

apps/api-reference/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
5+
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

apps/api-reference/src/markdown-components.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ export const MARKDOWN_COMPONENTS = {
3131
</Code>
3232
);
3333
} else {
34-
// @ts-expect-error react-markdown doesn't officially support react 19
35-
// yet; there's no issues here in practice but the types don't currently
36-
// unify
3734
return <pre {...props} />;
3835
}
3936
},

apps/hermes/client/js/src/examples/HermesClient.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import yargs from "yargs";
22
import { hideBin } from "yargs/helpers";
33

4-
import { HermesClient } from "../HermesClient";
4+
import { HermesClient, PriceUpdate } from "../HermesClient";
55

66
function sleep(ms: number) {
77
return new Promise((resolve) => setTimeout(resolve, ms));
@@ -79,11 +79,12 @@ async function run() {
7979
benchmarksOnly: true,
8080
});
8181

82-
eventSource.onmessage = (event) => {
82+
eventSource.onmessage = (event: MessageEvent<string>) => {
8383
console.log("Received price update:", event.data);
84+
const _priceUpdate = JSON.parse(event.data) as PriceUpdate;
8485
};
8586

86-
eventSource.onerror = (error) => {
87+
eventSource.onerror = (error: Event) => {
8788
console.error("Error receiving updates:", error);
8889
eventSource.close();
8990
};

apps/insights/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
5+
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

apps/insights/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"clsx": "catalog:",
3636
"cryptocurrency-icons": "catalog:",
3737
"dnum": "catalog:",
38-
"framer-motion": "catalog:",
38+
"motion": "catalog:",
3939
"next": "catalog:",
4040
"next-themes": "catalog:",
4141
"nuqs": "catalog:",
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import type { Metadata } from "next";
2+
3+
import { client } from "../../../services/pyth";
4+
export { PriceFeedLayout as default } from "../../../components/PriceFeed/layout";
5+
6+
export const metadata: Metadata = {
7+
title: "Price Feeds",
8+
};
9+
10+
export const generateStaticParams = async () => {
11+
const data = await client.getData();
12+
return data.symbols.map((symbol) => ({ slug: encodeURIComponent(symbol) }));
13+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { Chart as default } from "../../../components/PriceFeed/chart";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { PriceComponents as default } from "../../../../components/PriceFeed/price-components";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { PriceFeedsLayout as default } from "../../components/PriceFeeds/layout";

0 commit comments

Comments
 (0)