Skip to content

Commit

Permalink
fix: check block for maker
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Nov 19, 2024
1 parent f1406f9 commit a4fa9dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions eth_portfolio/protocols/lending/maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit a4fa9dc

Please sign in to comment.