Skip to content

Commit

Permalink
Exclude coming soon feeds from alerts (#82)
Browse files Browse the repository at this point in the history
* skip alerting on coming soon feeds

* feat: bump ver
  • Loading branch information
tejasbadadare authored Dec 3, 2024
1 parent c90f52a commit 7abc071
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ignore_missing_imports = true

[tool.poetry]
name = "pyth-observer"
version = "0.3.0"
version = "0.3.1"
description = "Alerts and stuff"
authors = []
readme = "README.md"
Expand Down
6 changes: 6 additions & 0 deletions pyth_observer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ async def run(self):
# for each publisher).
states = []
price_accounts = await self.get_pyth_prices(product)

# If the min_publishers is set to 255, this is a "coming soon" feed and is not live yet
# Skip alerting on these feeds
if product.prices[PythPriceType.PRICE].min_publishers == 255:
continue

crosschain_price = crosschain_prices.get(
b58decode(product.first_price_account_key.key).hex(), None
)
Expand Down

0 comments on commit 7abc071

Please sign in to comment.