Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support minContextSlot in getParsedAccountInfo method #27084

Merged
merged 1 commit into from
Aug 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat: support minContextSlot in getParsedAccountInfo method
  • Loading branch information
jstarry committed Aug 11, 2022
commit dc44214fa794c87857e874faaaf3488c764554e3
5 changes: 4 additions & 1 deletion web3.js/src/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down