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 third_party/pyth/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 third_party/pyth/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.2.0",
"version": "2.2.1",
"description": "Pyth Price Service",
"main": "index.js",
"scripts": {
Expand Down
8 changes: 5 additions & 3 deletions third_party/pyth/price-service/src/listen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ export class Listener implements PriceStore {
async processVaa(vaa: Buffer) {
const { parse_vaa } = await importCoreWasm();

const vaaHash: VaaHash = createHash("md5").update(vaa).digest("base64");
const parsedVaa = parse_vaa(vaa);

const vaaHash: VaaHash = createHash("md5")
.update(Buffer.from(parsedVaa.payload))
.digest("base64");

if (this.observedVaas.has(vaaHash)) {
return;
Expand All @@ -169,8 +173,6 @@ export class Listener implements PriceStore {
this.observedVaas.set(vaaHash, true);
this.promClient?.incReceivedVaa();

const parsedVaa = parse_vaa(vaa);

let batchAttestation;

try {
Expand Down