Test get_valid_pair_combination

This commit is contained in:
Matthias
2019-07-03 20:20:12 +02:00
parent 1bcf2737fe
commit 40fe2d2c16
2 changed files with 21 additions and 5 deletions

View File

@@ -275,7 +275,7 @@ class Exchange(object):
Get valid combination of paira and pairb by trying both combinations.
"""
for pair in [f"{paira}/{pairb}", f"{pairb}/{paira}"]:
if pair in self._api.markets and self._api.markets[pair].get('active'):
if pair in self.markets and self.markets[pair].get('active'):
return pair
raise DependencyException(f"Could not combine {paira} and {pairb} to get a valid pair.")