Remove questionable handling of orders

This commit is contained in:
Matthias 2020-03-25 10:45:05 +01:00
parent 3c1b155e9f
commit 95011919d3
2 changed files with 2 additions and 7 deletions

View File

@ -866,12 +866,6 @@ class FreqtradeBot:
trade_state_update = self.update_trade_state(trade, order)
# Check if trade is still actually open
# TODO: this seems questionable at best
# if float(order.get('remaining', 0.0)) == 0.0:
# self.wallets.update()
# continue
if (order['side'] == 'buy' and (
trade_state_update
or self._check_timed_out('buy', order))):

View File

@ -2276,7 +2276,8 @@ def test_handle_timedout_limit_sell(mocker, default_conf) -> None:
assert freqtrade.handle_timedout_limit_sell(trade, order)
assert cancel_order_mock.call_count == 1
order['amount'] = 2
assert freqtrade.handle_timedout_limit_sell(trade, order) == 'partially filled - keeping order open'
assert (freqtrade.handle_timedout_limit_sell(trade, order)
== 'partially filled - keeping order open')
# Assert cancel_order was not called (callcount remains unchanged)
assert cancel_order_mock.call_count == 1