Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions price-service/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion price-service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pythnetwork/pyth-price-service",
"version": "2.3.0",
"version": "2.3.1",
"description": "Pyth Price Service",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion price-service/src/__tests__/rest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function dummyPriceInfoPair(
priceFeed: dummyPriceFeed(id),
publishTime: 0,
attestationTime: 0,
seqNum: BigInt(seqNum),
seqNum,
vaa: Buffer.from(vaa, "hex"),
emitterChainId: 0,
priceServiceReceiveTime: 0,
Expand Down
4 changes: 2 additions & 2 deletions price-service/src/listen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { PromClient } from "./promClient";

export type PriceInfo = {
vaa: Buffer;
seqNum: bigint;
seqNum: number;
publishTime: TimestampInSec;
attestationTime: TimestampInSec;
priceFeed: PriceFeed;
Expand Down Expand Up @@ -284,7 +284,7 @@ export class Listener implements PriceStore {

const priceFeed = priceAttestationToPriceFeed(priceAttestation);
const priceInfo = {
seqNum: parsedVaa.sequence,
seqNum: Number(parsedVaa.sequence),
vaa,
publishTime: priceAttestation.publishTime,
attestationTime: priceAttestation.attestationTime,
Expand Down
4 changes: 2 additions & 2 deletions price-service/src/rest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class RestException extends Error {
function asyncWrapper(
callback: (req: Request, res: Response, next: NextFunction) => Promise<any>
) {
return function (req: Request, res: Response, next: NextFunction) {
return (req: Request, res: Response, next: NextFunction) => {
callback(req, res, next).catch(next);
};
}
Expand Down Expand Up @@ -134,7 +134,7 @@ export class RestAPI {

// Multiple price ids might share same vaa, we use sequence number as
// key of a vaa and deduplicate using a map of seqnum to vaa bytes.
const vaaMap = new Map<bigint, Buffer>();
const vaaMap = new Map<number, Buffer>();

const notFoundIds: string[] = [];

Expand Down