File tree Expand file tree Collapse file tree 2 files changed +8
-14
lines changed
governance/pyth_staking_sdk Expand file tree Collapse file tree 2 files changed +8
-14
lines changed Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff 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 } ) =>
You can’t perform that action at this time.
0 commit comments