Merge pull request #2921 from hroff-1902/adjust-buy-notification

Move rpc send to be after db session add/flash
This commit is contained in:
Matthias 2020-02-14 20:02:56 +01:00 committed by GitHub
commit ab27d2c720
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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: