Skip to content
This repository was archived by the owner on Apr 3, 2023. It is now read-only.

Commit 8e74e53

Browse files
authored
Cascade pyth-sdk-js update to pyth-common-js (#50)
1 parent 7ada693 commit 8e74e53

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

pyth-common-js/package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyth-common-js/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pythnetwork/pyth-common-js",
3-
"version": "0.5.0",
3+
"version": "1.0.0",
44
"description": "Pyth Network Common Utils in JS",
55
"author": {
66
"name": "Pyth Data Association"
@@ -41,7 +41,7 @@
4141
"yargs": "^17.4.1"
4242
},
4343
"dependencies": {
44-
"@pythnetwork/pyth-sdk-js": "^0.2.0",
44+
"@pythnetwork/pyth-sdk-js": "^1.0.0",
4545
"@types/ws": "^8.5.3",
4646
"axios": "^0.26.1",
4747
"axios-retry": "^3.2.4",

pyth-common-js/src/examples/PriceServiceClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ async function run() {
3636
const priceIds = argv.priceIds as string[];
3737
const priceFeeds = await connection.getLatestPriceFeeds(priceIds);
3838
console.log(priceFeeds);
39-
console.log(priceFeeds?.at(0)?.getCurrentPrice());
39+
console.log(priceFeeds?.at(0)?.getPriceNoOlderThan(60));
4040

4141
console.log("Subscribing to price feed updates.");
4242

4343
await connection.subscribePriceFeedUpdates(priceIds, (priceFeed) => {
4444
console.log(
4545
`Current price for ${priceFeed.id}: ${JSON.stringify(
46-
priceFeed.getCurrentPrice()
46+
priceFeed.getPriceNoOlderThan(60)
4747
)}.`
4848
);
4949
});

pyth-common-js/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ export {
88
HexString,
99
PriceFeed,
1010
Price,
11-
PriceStatus,
1211
UnixTimestamp,
1312
} from "@pythnetwork/pyth-sdk-js";

0 commit comments

Comments
 (0)