Use hyperopt safe amount precision method

This commit is contained in:
Matthias
2022-08-20 14:13:15 +02:00
parent 52ec0d1046
commit 5b3f031590
2 changed files with 7 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ from tests.conftest import patch_exchange
def test_backtest_position_adjustment(default_conf, fee, mocker, testdatadir) -> None:
default_conf['use_exit_signal'] = False
mocker.patch('freqtrade.exchange.Exchange.get_fee', fee)
mocker.patch('freqtrade.exchange.Exchange.amount_to_precision', lambda s, x, y: round(y, 8))
mocker.patch('freqtrade.optimize.backtesting.amount_to_precision', lambda x, y, z: round(x, 8))
mocker.patch("freqtrade.exchange.Exchange.get_min_pair_stake_amount", return_value=0.00001)
mocker.patch("freqtrade.exchange.Exchange.get_max_pair_stake_amount", return_value=float('inf'))
patch_exchange(mocker)