Skip to content

Commit da6c118

Browse files
authored
Merge pull request #2563 from pyth-network/cprussin/rev-pyth-staking-sdk
chore(staking-sdk): rev staking-sdk version
2 parents 35a46df + 0a56478 commit da6c118

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

Diff for: governance/pyth_staking_sdk/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pythnetwork/staking-sdk",
3-
"version": "0.0.3",
3+
"version": "0.1.0",
44
"description": "Pyth staking SDK",
55
"main": "src/index.ts",
66
"types": "src/index.d.ts",

Diff for: governance/pyth_staking_sdk/src/pyth-staking-client.ts

+7-13
Original file line numberDiff line numberDiff line change
@@ -1047,9 +1047,6 @@ export class PythStakingClient {
10471047
public async getAllStakeAccountPositionsAllOwners(): Promise<
10481048
StakeAccountPositions[]
10491049
> {
1050-
// eslint-disable-next-line no-console
1051-
console.log("Calling RPC");
1052-
10531050
const res = await fetch(this.connection.rpcEndpoint, {
10541051
method: "POST",
10551052
headers: {
@@ -1078,9 +1075,6 @@ export class PythStakingClient {
10781075
}),
10791076
});
10801077

1081-
// eslint-disable-next-line no-console
1082-
console.log("Received response");
1083-
10841078
if (res.ok) {
10851079
const { body } = res;
10861080
if (body) {
@@ -1101,17 +1095,17 @@ export class PythStakingClient {
11011095
}
11021096
};
11031097

1104-
// eslint-disable-next-line no-console
1105-
console.log("Running JSON parser");
1106-
11071098
parse().catch((error: unknown) => {
1108-
reject(error instanceof Error ? error : new Error("Unknown Error"));
1099+
reject(
1100+
error instanceof Error
1101+
? error
1102+
: new Error(
1103+
typeof error === "string" ? error : "Unknown Error",
1104+
),
1105+
);
11091106
});
11101107
});
11111108

1112-
// eslint-disable-next-line no-console
1113-
console.log("Parsed JSON");
1114-
11151109
return accountSchema
11161110
.parse(accounts)
11171111
.map(({ pubkey, account }) =>

0 commit comments

Comments
 (0)