From 894d144261e234b2129be63fee41fdb0c3ea9776 Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Tue, 23 Jan 2024 15:23:04 -0500 Subject: [PATCH] fix: curve registry zero address on base (#501) --- y/prices/stable_swap/curve.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/y/prices/stable_swap/curve.py b/y/prices/stable_swap/curve.py index 296d2bd62..0b0190410 100644 --- a/y/prices/stable_swap/curve.py +++ b/y/prices/stable_swap/curve.py @@ -552,8 +552,8 @@ async def _load_all(self) -> None: await self.address_provider logger.debug("curve address provider events loaded, now loading factories and pools") # NOTE: Gnosis chain's address provider fails to provide registry via events. Maybe other chains as well. - if not self.identifiers[Ids.Main_Registry]: - self.identifiers[Ids.Main_Registry] = [await self.address_provider.get_registry()] + if not self.identifiers[Ids.Main_Registry] and (registry := await self.address_provider.get_registry()) != ZERO_ADDRESS: + self.identifiers[Ids.Main_Registry] = [registry] while True: # Check if any registries were updated, then ensure all old and new are loaded await asyncio.gather(*[