Skip to content

Commit 7d05857

Browse files
authored
feat: support minContextSlot in getParsedAccountInfo method (#27084)
1 parent d7ed86a commit 7d05857

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/connection.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -2871,14 +2871,17 @@ export class Connection {
28712871
*/
28722872
async getParsedAccountInfo(
28732873
publicKey: PublicKey,
2874-
commitment?: Commitment,
2874+
commitmentOrConfig?: Commitment | GetAccountInfoConfig,
28752875
): Promise<
28762876
RpcResponseAndContext<AccountInfo<Buffer | ParsedAccountData> | null>
28772877
> {
2878+
const {commitment, config} =
2879+
extractCommitmentFromConfig(commitmentOrConfig);
28782880
const args = this._buildArgs(
28792881
[publicKey.toBase58()],
28802882
commitment,
28812883
'jsonParsed',
2884+
config,
28822885
);
28832886
const unsafeRes = await this._rpcRequest('getAccountInfo', args);
28842887
const res = create(

0 commit comments

Comments
 (0)