Skip to content

Commit 78bd937

Browse files
authored
Merge pull request #44 from pyth-network/guibescos/fix-format
Format
2 parents bed1a5e + 46a594b commit 78bd937

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

src/PythConnection.ts

Lines changed: 1 addition & 9 deletions
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

Lines changed: 2 additions & 2 deletions
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)