Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion governance/pyth_staking_sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pythnetwork/staking-sdk",
"version": "0.0.3",
"version": "0.1.0",
"description": "Pyth staking SDK",
"main": "src/index.ts",
"types": "src/index.d.ts",
Expand Down
20 changes: 7 additions & 13 deletions governance/pyth_staking_sdk/src/pyth-staking-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1047,9 +1047,6 @@ 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 @@ -1078,9 +1075,6 @@ export class PythStakingClient {
}),
});

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

if (res.ok) {
const { body } = res;
if (body) {
Expand All @@ -1101,17 +1095,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"));
reject(
error instanceof Error
? error
: new Error(
typeof error === "string" ? error : "Unknown Error",
),
);
});
});

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

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