Skip to content

Commit

Permalink
♻️ refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mraniki committed Jun 28, 2023
1 parent 6366ded commit aa41308
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions dxsp/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,10 @@ async def get_swap(self, sell_token: str, buy_token: str, quantity: int) -> None
sell_token_address = await self.search_contract(sell_token)
sell_token_balance = await self.get_token_balance(sell_token)
if not sell_token_address or sell_token_balance in (0, None):
self.logger.debug(sell_token_address, sell_token_balance)
raise ValueError('No Money')

buy_token_address = await self.search_contract(buy_token)
if not buy_token_address:
self.logger.debug(buy_token_address)
raise ValueError('contract not found')
sell_amount = await self.calculate_sell_amount(sell_token, quantity)
sell_token_amount_wei = self.w3.to_wei(
Expand Down

0 comments on commit aa41308

Please sign in to comment.