feat: return null when account info not found

This commit is contained in:
Justin Starry
2020-04-05 16:18:45 +08:00
committed by Michael Vines
parent 0fcb1f6f56
commit 7989c10b7a
6 changed files with 57 additions and 40 deletions

View File

@@ -176,11 +176,11 @@ declare module '@solana/web3.js' {
getAccountInfoAndContext(
publicKey: PublicKey,
commitment: ?Commitment,
): Promise<RpcResponseAndContext<AccountInfo>>;
): Promise<RpcResponseAndContext<AccountInfo | null>>;
getAccountInfo(
publicKey: PublicKey,
commitment: ?Commitment,
): Promise<AccountInfo>;
): Promise<AccountInfo | null>;
getProgramAccounts(
programId: PublicKey,
commitment: ?Commitment,