File tree 2 files changed +8
-14
lines changed
governance/pyth_staking_sdk
2 files changed +8
-14
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @pythnetwork/staking-sdk" ,
3
- "version" : " 0.0.3 " ,
3
+ "version" : " 0.1.0 " ,
4
4
"description" : " Pyth staking SDK" ,
5
5
"main" : " src/index.ts" ,
6
6
"types" : " src/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -1047,9 +1047,6 @@ export class PythStakingClient {
1047
1047
public async getAllStakeAccountPositionsAllOwners ( ) : Promise <
1048
1048
StakeAccountPositions [ ]
1049
1049
> {
1050
- // eslint-disable-next-line no-console
1051
- console . log ( "Calling RPC" ) ;
1052
-
1053
1050
const res = await fetch ( this . connection . rpcEndpoint , {
1054
1051
method : "POST" ,
1055
1052
headers : {
@@ -1078,9 +1075,6 @@ export class PythStakingClient {
1078
1075
} ) ,
1079
1076
} ) ;
1080
1077
1081
- // eslint-disable-next-line no-console
1082
- console . log ( "Received response" ) ;
1083
-
1084
1078
if ( res . ok ) {
1085
1079
const { body } = res ;
1086
1080
if ( body ) {
@@ -1101,17 +1095,17 @@ export class PythStakingClient {
1101
1095
}
1102
1096
} ;
1103
1097
1104
- // eslint-disable-next-line no-console
1105
- console . log ( "Running JSON parser" ) ;
1106
-
1107
1098
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
+ ) ;
1109
1106
} ) ;
1110
1107
} ) ;
1111
1108
1112
- // eslint-disable-next-line no-console
1113
- console . log ( "Parsed JSON" ) ;
1114
-
1115
1109
return accountSchema
1116
1110
. parse ( accounts )
1117
1111
. map ( ( { pubkey, account } ) =>
You can’t perform that action at this time.
0 commit comments