Skip to content
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
12 changes: 12 additions & 0 deletions governance/pyth_staking_sdk/src/pyth-staking-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,9 @@ export class PythStakingClient {
public async getAllStakeAccountPositionsAllOwners(): Promise<
StakeAccountPositions[]
> {
// eslint-disable-next-line no-console
console.log("Calling RPC");

const res = await fetch(this.connection.rpcEndpoint, {
method: "POST",
headers: {
Expand Down Expand Up @@ -1075,6 +1078,9 @@ export class PythStakingClient {
}),
});

// eslint-disable-next-line no-console
console.log("Received response");

if (res.ok) {
const { body } = res;
if (body) {
Expand All @@ -1095,11 +1101,17 @@ export class PythStakingClient {
}
};

// eslint-disable-next-line no-console
console.log("Running JSON parser");

parse().catch((error: unknown) => {
reject(error instanceof Error ? error : new Error("Unknown Error"));
});
});

// eslint-disable-next-line no-console
console.log("Parsed JSON");

return accountSchema
.parse(accounts)
.map(({ pubkey, account }) =>
Expand Down