Skip to content

Commit 7abc071

Browse files
Exclude coming soon feeds from alerts (#82)
* skip alerting on coming soon feeds * feat: bump ver
1 parent c90f52a commit 7abc071

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ignore_missing_imports = true
44

55
[tool.poetry]
66
name = "pyth-observer"
7-
version = "0.3.0"
7+
version = "0.3.1"
88
description = "Alerts and stuff"
99
authors = []
1010
readme = "README.md"

pyth_observer/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ async def run(self):
9090
# for each publisher).
9191
states = []
9292
price_accounts = await self.get_pyth_prices(product)
93+
94+
# If the min_publishers is set to 255, this is a "coming soon" feed and is not live yet
95+
# Skip alerting on these feeds
96+
if product.prices[PythPriceType.PRICE].min_publishers == 255:
97+
continue
98+
9399
crosschain_price = crosschain_prices.get(
94100
b58decode(product.first_price_account_key.key).hex(), None
95101
)

0 commit comments

Comments
 (0)