@@ -33,6 +33,7 @@ import {
3333 buildSendThrottler ,
3434 IProgramAccount ,
3535 ThrottleParams ,
36+ getMultipleAccountsInfoBatched ,
3637} from "@streamflow/common/solana" ;
3738import * as borsh from "borsh" ;
3839import { Program } from "@coral-xyz/anchor" ;
@@ -1360,7 +1361,7 @@ export class SolanaStreamClient extends BaseStreamClient {
13601361 } ,
13611362 ] ) ;
13621363 const streamPubKeys = alignedOutgoingProgramAccounts . map ( ( account ) => account . account . stream ) ;
1363- const streamAccounts = await this . connection . getMultipleAccountsInfo ( streamPubKeys , TX_FINALITY_CONFIRMED ) ;
1364+ const streamAccounts = await getMultipleAccountsInfoBatched ( this . connection , streamPubKeys , TX_FINALITY_CONFIRMED ) ;
13641365 streamAccounts . forEach ( ( account , index ) => {
13651366 if ( account ) {
13661367 const alignedData = alignedOutgoingProgramAccounts [ index ] . account ;
@@ -1379,7 +1380,7 @@ export class SolanaStreamClient extends BaseStreamClient {
13791380 const alignedProxyPDAs = alignedStreamsPubKeys . map ( ( streamPubKey ) =>
13801381 deriveContractPDA ( this . alignedProxyProgram . programId , new PublicKey ( streamPubKey ) ) ,
13811382 ) ;
1382- const alignedProxyAccounts = await this . connection . getMultipleAccountsInfo ( alignedProxyPDAs ) ;
1383+ const alignedProxyAccounts = await getMultipleAccountsInfoBatched ( this . connection , alignedProxyPDAs ) ;
13831384 alignedProxyAccounts . forEach ( ( account , index ) => {
13841385 if ( account && account . data . length === ALIGNED_METADATA_ACC_SIZE ) {
13851386 const alignedData = streamRecord [ alignedStreamsPubKeys [ index ] ] ;
0 commit comments