Move rpc send to be after db session add/flash

This commit is contained in:
hroff-1902 2020-02-14 06:23:03 +03:00
parent 2dea362eda
commit 20c21b42d5

View File

@ -527,8 +527,6 @@ class FreqtradeBot:
ticker_interval=timeframe_to_minutes(self.config['ticker_interval'])
)
self._notify_buy(trade, order_type)
# Update fees if order is closed
if order_status == 'closed':
self.update_trade_state(trade, order)
@ -539,6 +537,8 @@ class FreqtradeBot:
# Updating wallets
self.wallets.update()
self._notify_buy(trade, order_type)
return True
def _notify_buy(self, trade: Trade, order_type: str) -> None: