Skip to content

Commit

Permalink
move stake check to the same condition as the other checks
Browse files Browse the repository at this point in the history
  • Loading branch information
iuvbio committed Mar 17, 2019
1 parent d4d3766 commit 7f9c76a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions freqtrade/pairlist/IPairList.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,11 @@ def _validate_whitelist(self, whitelist: List[str]) -> List[str]:
"""
markets = self._freqtrade.exchange.markets

# keep only pairs with stake currency as quote
stake_pairs = [pair for pair in markets if pair.endswith(self._config['stake_currency'])]
# markets[pair]["quote"] == self._config['stake_currency']

sanitized_whitelist = set()
for pair in whitelist:
# pair is not in the generated dynamic market, or in the blacklist ... ignore it
if pair in self.blacklist or pair not in stake_pairs:
if (pair in self.blacklist or pair not in markets
or not pair.endswith(self._config['stake_currency'])):
continue
# Check if market is active
market = markets[pair]
Expand Down

0 comments on commit 7f9c76a

Please sign in to comment.