Skip to content

Commit

Permalink
(fix) assign market initial value
Browse files Browse the repository at this point in the history
  • Loading branch information
Nullably committed Apr 1, 2021
1 parent c667dfe commit da6f050
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hummingbot/client/ui/completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ def get_subcommand_completer(self, first_word: str) -> Completer:
@property
def _trading_pair_completer(self) -> Completer:
trading_pair_fetcher = TradingPairFetcher.get_instance()
market = ""
for exchange in sorted(list(CONNECTOR_SETTINGS.keys()), key=len, reverse=True):
if exchange in self.prompt_text:
market = exchange
break
trading_pairs = trading_pair_fetcher.trading_pairs.get(market, []) if trading_pair_fetcher.ready else []
trading_pairs = trading_pair_fetcher.trading_pairs.get(market, []) if trading_pair_fetcher.ready and market else []
return WordCompleter(trading_pairs, ignore_case=True, sentence=True)

@property
Expand Down

0 comments on commit da6f050

Please sign in to comment.