From 77aa372909899ec0f823fd322acf4e71d933baa2 Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Fri, 10 Sep 2021 02:09:27 -0600 Subject: [PATCH] Fixed test_ftx patch --- freqtrade/exchange/exchange.py | 3 +-- tests/exchange/test_ftx.py | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index b07ee95ce..b9da0cf7c 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -75,8 +75,6 @@ class Exchange: } _ft_has: Dict = {} - _leverage_brackets: Dict = {} - _supported_trading_mode_collateral_pairs: List[Tuple[TradingMode, Collateral]] = [ # TradingMode.SPOT always supported and not required in this list ] @@ -90,6 +88,7 @@ class Exchange: self._api: ccxt.Exchange = None self._api_async: ccxt_async.Exchange = None self._markets: Dict = {} + self._leverage_brackets: Dict = {} self._config.update(config) diff --git a/tests/exchange/test_ftx.py b/tests/exchange/test_ftx.py index a98e46b27..33eb0e3c4 100644 --- a/tests/exchange/test_ftx.py +++ b/tests/exchange/test_ftx.py @@ -227,8 +227,5 @@ def test_get_max_leverage_ftx(default_conf, mocker, pair, nominal_value, max_lev def test_fill_leverage_brackets_ftx(default_conf, mocker): # FTX only has one account wide leverage, so there's no leverage brackets exchange = get_patched_exchange(mocker, default_conf, id="ftx") - # TODO: This is a patch, develop a real solution - # TODO: _leverage_brackets retains it's value from the binance tests, but shouldn't - exchange._leverage_brackets = {} exchange.fill_leverage_brackets() assert exchange._leverage_brackets == {}