feat: support minContextSlot in getParsedAccountInfo method (#27084)

This commit is contained in:
Justin Starry 2022-08-11 15:28:54 +01:00 committed by GitHub
parent ac91cdab74
commit 7e7785fc19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -2871,14 +2871,17 @@ export class Connection {
*/
async getParsedAccountInfo(
publicKey: PublicKey,
commitment?: Commitment,
commitmentOrConfig?: Commitment | GetAccountInfoConfig,
): Promise<
RpcResponseAndContext<AccountInfo<Buffer | ParsedAccountData> | 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(