Skip to content

Commit

Permalink
Fixed bug where numberofpairs setting was ignored.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberjunky committed Nov 14, 2021
1 parent 8ee1c3d commit 26bfd63
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions altrank.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,11 +445,13 @@ def find_pairs(thebot):

# Did we get enough pairs already?
fixednumpairs = int(config.get("settings", "numberofpairs"))
if fixednumpairs:
if len(newpairslist) == fixednumpairs:
break
else:
if len(newpairslist) == int(thebot["max_active_deals"]):
break

if fixednumpairs and len(newpairslist) == fixednumpairs:
break
if len(newpairslist) == int(thebot["max_active_deals"]):
break
except KeyError as err:
logger.error(
"Something went wrong while parsing LunarCrush data. KeyError for field %s"
Expand Down
10 changes: 6 additions & 4 deletions galaxyscore.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,11 +445,13 @@ def find_pairs(thebot):

# Did we get enough pairs already?
fixednumpairs = int(config.get("settings", "numberofpairs"))
if fixednumpairs:
if len(newpairslist) == fixednumpairs:
break
else:
if len(newpairslist) == int(thebot["max_active_deals"]):
break

if fixednumpairs and len(newpairslist) == fixednumpairs:
break
if len(newpairslist) == int(thebot["max_active_deals"]):
break
except KeyError as err:
logger.error(
"Something went wrong while parsing LunarCrush data. KeyError for field %s"
Expand Down

0 comments on commit 26bfd63

Please sign in to comment.