Skip to content

Commit c9771e6

Browse files
committed
2.9.0
1 parent b17b013 commit c9771e6

File tree

4 files changed

+6
-14
lines changed

4 files changed

+6
-14
lines changed

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pythnetwork/client",
3-
"version": "2.8.0",
3+
"version": "2.9.0",
44
"description": "Client for consuming Pyth price data",
55
"homepage": "https://pyth.network",
66
"main": "lib/index.js",

src/PythConnection.ts

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
import { Connection, PublicKey, Commitment, AccountInfo } from '@solana/web3.js'
2-
import {
3-
parseBaseData,
4-
parsePriceData,
5-
parseProductData,
6-
PriceData,
7-
Product,
8-
ProductData,
9-
AccountType,
10-
} from './index'
2+
import { parseBaseData, parsePriceData, parseProductData, PriceData, Product, ProductData, AccountType } from './index'
113

124
const ONES = '11111111111111111111111111111111'
135

src/example_ws_usage.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const pythPublicKey = getPythProgramKeyForCluster(PYTHNET_CLUSTER_NAME)
1010
const pythConnection = new PythConnection(connection, pythPublicKey)
1111
pythConnection.onPriceChangeVerbose((productAccount, priceAccount) => {
1212
// The arguments to the callback include solana account information / the update slot if you need it.
13-
const product = productAccount.accountInfo.data.product;
14-
const price = priceAccount.accountInfo.data;
13+
const product = productAccount.accountInfo.data.product
14+
const price = priceAccount.accountInfo.data
1515
// sample output:
1616
// SOL/USD: $14.627930000000001 ±$0.01551797
1717
if (price.price && price.confidence) {

0 commit comments

Comments
 (0)