Skip to content

Commit

Permalink
Merge pull request #211 from bancorprotocol/210-bugfix-in-flashloan-g…
Browse files Browse the repository at this point in the history
…eneration

Convert tkn key when WETH > ETH for single-flashloan creation
  • Loading branch information
mikewcasale committed Nov 16, 2023
2 parents 5842096 + 57492b8 commit b064885
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fastlane_bot/helpers/routehandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,9 @@ def _extract_single_flashloan_token(self, trade_instructions: List[TradeInstruct
Generate a flashloan tokens and amounts.
:param trade_instructions: A list of trade instruction objects
"""
flash_tokens = {trade_instructions[0].tknin_key: {"tkn": self.wrapped_gas_token_to_native(trade_instructions[0]._tknin_address),


flash_tokens = {self.wrapped_gas_token_to_native(trade_instructions[0].tknin_key): {"tkn": self.wrapped_gas_token_to_native(trade_instructions[0]._tknin_address),
"flash_amt": trade_instructions[0].amtin_wei,
"decimals": trade_instructions[0].tknin_decimals}}
return flash_tokens
Expand Down

0 comments on commit b064885

Please sign in to comment.