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 11{
22 "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. " ,
55 "main" : " index.js" ,
66 "scripts" : {
77 "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", () => {
246246 . query ( {
247247 data : "0x" + id + pubTime16AsHex64Bit ,
248248 } ) ;
249- const pubTime20AsHex64Bit = "0000000000000014" ;
250249 expect ( ccipResp . status ) . toBe ( StatusCodes . OK ) ;
251250 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" ) ,
256252 } ) ;
257253 } ) ;
258254
@@ -372,10 +368,7 @@ describe("Get VAA endpoint and Get VAA CCIP", () => {
372368 } ) ;
373369 expect ( ccipResp . status ) . toBe ( StatusCodes . OK ) ;
374370 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" ) ,
379372 } ) ;
380373
381374 dbApp . close ( ) ;
Original file line number Diff line number Diff line change @@ -239,13 +239,7 @@ export class RestAPI {
239239 . status ( StatusCodes . BAD_GATEWAY )
240240 . json ( { "message:" : "VAA not found." } ) ;
241241 } 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" ) ;
249243
250244 res . json ( {
251245 data : resData ,
You can’t perform that action at this time.
0 commit comments