|
20 | 20 | from pyth_observer.check import State |
21 | 21 | from pyth_observer.check.price_feed import PriceFeedState |
22 | 22 | from pyth_observer.check.publisher import PublisherState |
23 | | -from pyth_observer.coingecko import Symbol, get_coingecko_prices |
| 23 | +from pyth_observer.coingecko import get_coingecko_prices |
24 | 24 | from pyth_observer.dispatch import Dispatch |
25 | 25 | from pyth_observer.metrics import metrics |
26 | 26 | from pyth_observer.models import Publisher |
@@ -54,7 +54,7 @@ def __init__( |
54 | 54 | self, |
55 | 55 | config: Dict[str, Any], |
56 | 56 | publishers: Dict[str, Publisher], |
57 | | - coingecko_mapping: Dict[str, Symbol], |
| 57 | + coingecko_mapping: Dict[str, str], |
58 | 58 | ) -> None: |
59 | 59 | self.config = config |
60 | 60 | self.dispatch = Dispatch(config, publishers) |
@@ -95,7 +95,7 @@ async def run(self) -> None: |
95 | 95 |
|
96 | 96 | for product in products: |
97 | 97 | # Skip tombstone accounts with blank metadata |
98 | | - if "base" not in product.attrs: |
| 98 | + if "symbol" not in product.attrs: |
99 | 99 | continue |
100 | 100 |
|
101 | 101 | if not product.first_price_account_key: |
@@ -139,9 +139,11 @@ async def run(self) -> None: |
139 | 139 | latest_trading_slot=price_account.last_slot, |
140 | 140 | price_aggregate=price_account.aggregate_price_info.price, |
141 | 141 | confidence_interval_aggregate=price_account.aggregate_price_info.confidence_interval, |
142 | | - coingecko_price=coingecko_prices.get(product.attrs["base"]), |
| 142 | + coingecko_price=coingecko_prices.get( |
| 143 | + product.attrs["symbol"] |
| 144 | + ), |
143 | 145 | coingecko_update=coingecko_updates.get( |
144 | | - product.attrs["base"] |
| 146 | + product.attrs["symbol"] |
145 | 147 | ), |
146 | 148 | ) |
147 | 149 |
|
|
0 commit comments