|
|
@@ -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: {
|
|
|
@@ -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) {
|
|
|
@@ -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 }) =>
|