Remove questionable handling of orders
This commit is contained in:
parent
3c1b155e9f
commit
95011919d3
@ -866,12 +866,6 @@ class FreqtradeBot:
|
|||||||
|
|
||||||
trade_state_update = self.update_trade_state(trade, order)
|
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 (
|
if (order['side'] == 'buy' and (
|
||||||
trade_state_update
|
trade_state_update
|
||||||
or self._check_timed_out('buy', order))):
|
or self._check_timed_out('buy', order))):
|
||||||
|
@ -2276,7 +2276,8 @@ def test_handle_timedout_limit_sell(mocker, default_conf) -> None:
|
|||||||
assert freqtrade.handle_timedout_limit_sell(trade, order)
|
assert freqtrade.handle_timedout_limit_sell(trade, order)
|
||||||
assert cancel_order_mock.call_count == 1
|
assert cancel_order_mock.call_count == 1
|
||||||
order['amount'] = 2
|
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 was not called (callcount remains unchanged)
|
||||||
assert cancel_order_mock.call_count == 1
|
assert cancel_order_mock.call_count == 1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user