Skip to content

Commit

Permalink
return candidate if len(candidates) == 1
Browse files Browse the repository at this point in the history
  • Loading branch information
enarjord committed Dec 9, 2024
1 parent e35d235 commit 569ffa6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/procedures.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ def coin_to_symbol(coin, eligible_symbols=None, quote="USDT", verbose=True):
# next format coin (e.g. 1000SHIB -> SHIB, kPEPE -> PEPE, etc)
coinf = symbol_to_coin(coin)
candidates = {s for s in eligible_symbols if coinf in s}
if len(candidates) == 1:
return next(iter(candidates))
# next check if multiple matches
if len(candidates) > 1:
for candidate in candidates:
Expand Down

0 comments on commit 569ffa6

Please sign in to comment.