fix(ethereum): emit update event on parse* methods in MockPyth
This commit is contained in:
parent
ab10b9f5fa
commit
c5d02afe53
|
@ -58589,7 +58589,7 @@
|
|||
},
|
||||
"target_chains/ethereum/sdk/js": {
|
||||
"name": "@pythnetwork/pyth-evm-js",
|
||||
"version": "1.29.3",
|
||||
"version": "1.29.4",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@pythnetwork/price-service-client": "*",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@pythnetwork/pyth-evm-js",
|
||||
"version": "1.29.3",
|
||||
"version": "1.29.4",
|
||||
"description": "Pyth Network EVM Utils in JS",
|
||||
"homepage": "https://pyth.network",
|
||||
"author": {
|
||||
|
|
|
@ -58,7 +58,7 @@ contract MockPyth is AbstractPyth {
|
|||
priceFeeds[priceFeed.id] = priceFeed;
|
||||
emit PriceFeedUpdate(
|
||||
priceFeed.id,
|
||||
uint64(lastPublishTime),
|
||||
uint64(priceFeed.price.publishTime),
|
||||
priceFeed.price.price,
|
||||
priceFeed.price.conf
|
||||
);
|
||||
|
@ -101,6 +101,12 @@ contract MockPyth is AbstractPyth {
|
|||
uint publishTime = feeds[i].price.publishTime;
|
||||
if (priceFeeds[feeds[i].id].price.publishTime < publishTime) {
|
||||
priceFeeds[feeds[i].id] = feeds[i];
|
||||
emit PriceFeedUpdate(
|
||||
feeds[i].id,
|
||||
uint64(publishTime),
|
||||
feeds[i].price.price,
|
||||
feeds[i].price.conf
|
||||
);
|
||||
}
|
||||
|
||||
if (feeds[i].id == priceIds[i]) {
|
||||
|
|
Loading…
Reference in New Issue