mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
Ensure no None status is passed from "create_order"
This commit is contained in:
@@ -1079,6 +1079,9 @@ class Exchange:
|
||||
rate_for_order,
|
||||
params,
|
||||
)
|
||||
if order.get('status') is None:
|
||||
# Map empty status to open.
|
||||
order['status'] = 'open'
|
||||
self._log_exchange_response('create_order', order)
|
||||
order = self._order_contracts_to_amount(order)
|
||||
return order
|
||||
|
||||
@@ -1447,6 +1447,7 @@ def test_buy_considers_time_in_force(default_conf, mocker, exchange_name):
|
||||
|
||||
assert 'id' in order
|
||||
assert 'info' in order
|
||||
assert order['status'] == 'open'
|
||||
assert order['id'] == order_id
|
||||
assert api_mock.create_order.call_args[0][0] == 'ETH/BTC'
|
||||
assert api_mock.create_order.call_args[0][1] == order_type
|
||||
|
||||
Reference in New Issue
Block a user