File tree Expand file tree Collapse file tree 3 files changed +5
-18
lines changed Expand file tree Collapse file tree 3 files changed +5
-18
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @pythnetwork/price-service-server" ,
3
- "version" : " 2.3.5 " ,
4
- "description" : " Pyth price pervice server " ,
3
+ "version" : " 3.0.0 " ,
4
+ "description" : " Webservice for retrieving prices from the Pyth oracle. " ,
5
5
"main" : " index.js" ,
6
6
"scripts" : {
7
7
"format" : " prettier --write \" src/**/*.ts\" " ,
Original file line number Diff line number Diff line change @@ -246,13 +246,9 @@ describe("Get VAA endpoint and Get VAA CCIP", () => {
246
246
. query ( {
247
247
data : "0x" + id + pubTime16AsHex64Bit ,
248
248
} ) ;
249
- const pubTime20AsHex64Bit = "0000000000000014" ;
250
249
expect ( ccipResp . status ) . toBe ( StatusCodes . OK ) ;
251
250
expect ( ccipResp . body ) . toEqual ( {
252
- data :
253
- "0x" +
254
- pubTime20AsHex64Bit +
255
- Buffer . from ( "abcd20" , "base64" ) . toString ( "hex" ) ,
251
+ data : "0x" + Buffer . from ( "abcd20" , "base64" ) . toString ( "hex" ) ,
256
252
} ) ;
257
253
} ) ;
258
254
@@ -372,10 +368,7 @@ describe("Get VAA endpoint and Get VAA CCIP", () => {
372
368
} ) ;
373
369
expect ( ccipResp . status ) . toBe ( StatusCodes . OK ) ;
374
370
expect ( ccipResp . body ) . toEqual ( {
375
- data :
376
- "0x" +
377
- pubTime5AsHex64Bit +
378
- Buffer . from ( `pythnet${ id } 5` , "base64" ) . toString ( "hex" ) ,
371
+ data : "0x" + Buffer . from ( `pythnet${ id } 5` , "base64" ) . toString ( "hex" ) ,
379
372
} ) ;
380
373
381
374
dbApp . close ( ) ;
Original file line number Diff line number Diff line change @@ -239,13 +239,7 @@ export class RestAPI {
239
239
. status ( StatusCodes . BAD_GATEWAY )
240
240
. json ( { "message:" : "VAA not found." } ) ;
241
241
} else {
242
- const pubTimeBuffer = Buffer . alloc ( 8 ) ;
243
- pubTimeBuffer . writeBigInt64BE ( BigInt ( vaa . publishTime ) ) ;
244
-
245
- const resData =
246
- "0x" +
247
- pubTimeBuffer . toString ( "hex" ) +
248
- Buffer . from ( vaa . vaa , "base64" ) . toString ( "hex" ) ;
242
+ const resData = "0x" + Buffer . from ( vaa . vaa , "base64" ) . toString ( "hex" ) ;
249
243
250
244
res . json ( {
251
245
data : resData ,
You can’t perform that action at this time.
0 commit comments