Skip to content

Commit

Permalink
Merge pull request #2211 from Drakkar-Software/dev
Browse files Browse the repository at this point in the history
Master merge
  • Loading branch information
GuillaumeDSM authored Jan 30, 2023
2 parents 17b3b3d + f49d4e4 commit a61102a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
22 changes: 14 additions & 8 deletions octobot/community/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,14 +492,20 @@ async def update_portfolio(self, current_value: dict, initial_value: dict,
}
for key, quantity in content.items()
]
formatted_history = [
{
"date": self._get_graphql_formatted_time(timestamp),
"value": str(value[unit])
}
for timestamp, value in history.items()
if unit in value
]
formatted_history = []
try:
formatted_history = [
{
"date": self._get_graphql_formatted_time(timestamp),
"value": str(value[unit])
}
for timestamp, value in history.items()
if unit in value
]
except KeyError:
pass
if not formatted_history:
return
await self._update_bot_portfolio(
ref_market_current_value, ref_market_initial_value, unit,
formatted_content, formatted_history
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cython==0.29.32

# Drakkar-Software requirements
OctoBot-Commons==1.8.6
OctoBot-Trading==2.3.14
OctoBot-Trading==2.3.15
OctoBot-Evaluators==1.8.1
OctoBot-Tentacles-Manager==2.8.3
OctoBot-Services==1.4.1
Expand Down

0 comments on commit a61102a

Please sign in to comment.