Skip to content

Commit

Permalink
Fix getProgramAccounts
Browse files Browse the repository at this point in the history
  • Loading branch information
DaSichuan committed Jun 7, 2024
1 parent 9dc281b commit 71d5f12
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion solend-sdk/src/rpc/cached.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export class CachedConnection implements SolendRPCConnection {
async getProgramAccounts(
programId: PublicKey,
configOrCommitment?: GetProgramAccountsConfig | Commitment
): Promise<RpcResponseAndContext<GetProgramAccountsResponse>> {
): Promise<GetProgramAccountsResponse> {
const key = `getProgramAccounts_${programId.toBase58()}_${JSON.stringify(
configOrCommitment
)}`;
Expand Down
2 changes: 1 addition & 1 deletion solend-sdk/src/rpc/instrumented.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class InstrumentedConnection implements SolendRPCConnection {
getProgramAccounts(
programId: PublicKey,
configOrCommitment?: GetProgramAccountsConfig | Commitment
): Promise<RpcResponseAndContext<GetProgramAccountsResponse>> {
): Promise<GetProgramAccountsResponse> {
return this.withStats(
this.connection.getProgramAccounts(programId, configOrCommitment),
"getProgramAccounts"
Expand Down
2 changes: 1 addition & 1 deletion solend-sdk/src/rpc/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export interface SolendRPCConnection {
getProgramAccounts(
programId: PublicKey,
configOrCommitment?: GetProgramAccountsConfig | Commitment
): Promise<RpcResponseAndContext<GetProgramAccountsResponse>>;
): Promise<GetProgramAccountsResponse>;
getRecentBlockhash(commitment?: Commitment): Promise<{
blockhash: Blockhash;
feeCalculator: FeeCalculator;
Expand Down
2 changes: 1 addition & 1 deletion solend-sdk/src/rpc/multi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class MultiConnection implements SolendRPCConnection {
getProgramAccounts(
programId: PublicKey,
configOrCommitment?: GetProgramAccountsConfig | Commitment
): Promise<RpcResponseAndContext<GetProgramAccountsResponse>> {
): Promise<GetProgramAccountsResponse> {
return Promise.race(
this.connections.map((c, index) =>
delayed(
Expand Down
2 changes: 1 addition & 1 deletion solend-sdk/src/rpc/retry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class RetryConnection implements SolendRPCConnection {
getProgramAccounts(
programId: PublicKey,
configOrCommitment?: GetProgramAccountsConfig | Commitment
): Promise<RpcResponseAndContext<GetProgramAccountsResponse>> {
): Promise<GetProgramAccountsResponse> {
return this.withRetries(
this.connection.getProgramAccounts(programId, configOrCommitment)
);
Expand Down

0 comments on commit 71d5f12

Please sign in to comment.