Skip to content

Commit

Permalink
fix: uni v3 get_balance for non verified token (#527)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Mar 4, 2024
1 parent a4fe534 commit bdc5210
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions y/prices/dex/uniswap/v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ async def check_liquidity(self, token: AnyAddressType, block: Block) -> Optional
liquidity = await self[token].balance_of(self.address, block, sync=False)
except ContractNotVerified:
logger.debug("%s is not verified and we cannot fetch balance the usual way. returning 0.", token)
return 0
logger.debug("%s liquidity for %s at %s: %s", self, token, block, liquidity)
return liquidity

Expand Down

0 comments on commit bdc5210

Please sign in to comment.