@@ -105,7 +105,12 @@ export class PythConnection {
105105 /** Create a PythConnection that reads its data from an underlying solana web3 connection.
106106 * pythProgramKey is the public key of the Pyth program running on the chosen solana cluster.
107107 */
108- constructor ( connection : Connection , pythProgramKey : PublicKey , commitment : Commitment = 'finalized' , feedIds ?: PublicKey [ ] ) {
108+ constructor (
109+ connection : Connection ,
110+ pythProgramKey : PublicKey ,
111+ commitment : Commitment = 'finalized' ,
112+ feedIds ?: PublicKey [ ] ,
113+ ) {
109114 this . connection = connection
110115 this . pythProgramKey = pythProgramKey
111116 this . commitment = commitment
@@ -124,21 +129,20 @@ export class PythConnection {
124129 this . handleAccount ( account . pubkey , account . account , true , currentSlot )
125130 }
126131
127- if ( this . feedIds ) {
132+ if ( this . feedIds ) {
128133 // Filter down to only the feeds we want
129134 const rawIDs = this . feedIds . map ( ( feed ) => feed . toString ( ) )
130135 accounts = accounts . filter ( ( feed ) => rawIDs . includes ( feed . pubkey . toString ( ) ) )
131- for ( const account of accounts ) {
136+ for ( const account of accounts ) {
132137 this . connection . onAccountChange (
133- account . pubkey ,
138+ account . pubkey ,
134139
135- ( accountInfo , context ) => {
136- this . handleAccount ( account . pubkey , accountInfo , false , context . slot )
137- } ,
138- this . commitment ,
139- )
140+ ( accountInfo , context ) => {
141+ this . handleAccount ( account . pubkey , accountInfo , false , context . slot )
142+ } ,
143+ this . commitment ,
144+ )
140145 }
141-
142146 } else {
143147 this . connection . onProgramAccountChange (
144148 this . pythProgramKey ,
0 commit comments