From a4fa9dc9f808a3ddc098983f253fc0be84543484 Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Mon, 18 Nov 2024 21:08:10 -0400 Subject: [PATCH] fix: check block for maker --- eth_portfolio/protocols/lending/maker.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eth_portfolio/protocols/lending/maker.py b/eth_portfolio/protocols/lending/maker.py index ca0ad45b..f0048ee8 100644 --- a/eth_portfolio/protocols/lending/maker.py +++ b/eth_portfolio/protocols/lending/maker.py @@ -56,6 +56,9 @@ async def _balances(self, address: Address, block: Optional[Block] = None) -> To @stuck_coro_debugger async def _debt(self, address: Address, block: Optional[int] = None) -> TokenBalances: + if block is not None and block <= await contract_creation_block_async(self.ilk_registry): + return TokenBalances(block=block) + ilks, urn = await asyncio.gather(self.get_ilks(block), self._urn(address)) data = await asyncio.gather(