diff --git a/freqtrade/configuration/config_validation.py b/freqtrade/configuration/config_validation.py index 48a460ccb..267509b43 100644 --- a/freqtrade/configuration/config_validation.py +++ b/freqtrade/configuration/config_validation.py @@ -230,8 +230,11 @@ def _validate_time_in_force(conf: Dict[str, Any]) -> None: "DEPRECATED: Using 'buy' and 'sell' for time_in_force is deprecated." "Please migrate your time_in_force settings to use 'entry' and 'exit'." ) - time_in_force['entry'] = time_in_force.pop('buy') - time_in_force['exit'] = time_in_force.pop('sell') + process_deprecated_setting( + conf, 'order_time_in_force', 'buy', 'order_time_in_force', 'entry') + + process_deprecated_setting( + conf, 'order_time_in_force', 'sell', 'order_time_in_force', 'exit') def _validate_order_types(conf: Dict[str, Any]) -> None: diff --git a/tests/test_configuration.py b/tests/test_configuration.py index 786fdbb73..2c1141940 100644 --- a/tests/test_configuration.py +++ b/tests/test_configuration.py @@ -997,6 +997,7 @@ def test_validate_order_types(default_conf, caplog) -> None: match=r"Please migrate your order_types settings to use the new wording\."): validate_config_consistency(conf) + def test_load_config_test_comments() -> None: """ Load config with comments