Skip to content

Commit

Permalink
Make fetchMultiple return type consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
quellen-sol committed Feb 6, 2023
1 parent eef9888 commit e581e9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ts/packages/anchor/src/program/namespace/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export class AccountClient<
async fetchMultiple(
addresses: Address[],
commitment?: Commitment
): Promise<(Object | null)[]> {
): Promise<(T | null)[]> {
const accounts = await this.fetchMultipleAndContext(addresses, commitment);
return accounts.map((account) => (account ? account.data : null));
}
Expand All @@ -225,7 +225,7 @@ export class AccountClient<
async fetchMultipleAndContext(
addresses: Address[],
commitment?: Commitment
): Promise<({ data: Object; context: Context } | null)[]> {
): Promise<({ data: T; context: Context } | null)[]> {
const accounts = await rpcUtil.getMultipleAccountsAndContext(
this._provider.connection,
addresses.map((address) => translateAddress(address)),
Expand Down

0 comments on commit e581e9b

Please sign in to comment.