From dc44214fa794c87857e874faaaf3488c764554e3 Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Thu, 11 Aug 2022 15:19:15 +0100 Subject: [PATCH] feat: support minContextSlot in getParsedAccountInfo method --- web3.js/src/connection.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web3.js/src/connection.ts b/web3.js/src/connection.ts index 4da88bd6422..0e68fca94fe 100644 --- a/web3.js/src/connection.ts +++ b/web3.js/src/connection.ts @@ -2871,14 +2871,17 @@ export class Connection { */ async getParsedAccountInfo( publicKey: PublicKey, - commitment?: Commitment, + commitmentOrConfig?: Commitment | GetAccountInfoConfig, ): Promise< RpcResponseAndContext | null> > { + const {commitment, config} = + extractCommitmentFromConfig(commitmentOrConfig); const args = this._buildArgs( [publicKey.toBase58()], commitment, 'jsonParsed', + config, ); const unsafeRes = await this._rpcRequest('getAccountInfo', args); const res = create(