Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
barak manos committed May 24, 2024
1 parent fe4eb9c commit c0d5ea0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions fastlane_bot/modes/pairwise_multi_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def get_combos(self) -> List[Any]:

def get_curve_combos(self, CC: Any) -> List[Any]:
carbon_curves = [x for x in CC.curves if x.params.exchange in self.ConfigObj.CARBON_V1_FORKS]
not_carbon_curves = [x for x in CC.curves if x.params.exchange not in self.ConfigObj.CARBON_V1_FORKS]
curve_combos = [[_curve0] + [_curve1] for _curve0 in not_carbon_curves for _curve1 in not_carbon_curves if (_curve0 != _curve1)]
non_carbon_curves = [x for x in CC.curves if x.params.exchange not in self.ConfigObj.CARBON_V1_FORKS]
curve_combos = [[_curve0] + [_curve1] for _curve0 in non_carbon_curves for _curve1 in non_carbon_curves if (_curve0 != _curve1)]

if len(carbon_curves) > 0:
base_direction_pair = carbon_curves[0].pair
Expand All @@ -31,10 +31,10 @@ def get_curve_combos(self, CC: Any) -> List[Any]:
curve_combos = []

if len(base_direction_one) > 0:
curve_combos += [[curve] + base_direction_one for curve in not_carbon_curves]
curve_combos += [[curve] + base_direction_one for curve in non_carbon_curves]

if len(base_direction_two) > 0:
curve_combos += [[curve] + base_direction_two for curve in not_carbon_curves]
curve_combos += [[curve] + base_direction_two for curve in non_carbon_curves]

if len(carbon_curves) >= 2:
curve_combos += [carbon_curves]
Expand Down
4 changes: 2 additions & 2 deletions fastlane_bot/modes/pairwise_multi_pol.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def get_combos(self) -> List[Any]:
def get_curve_combos(self, CC: Any) -> List[Any]:
pol_curves = [x for x in CC.curves if x.params.exchange == "bancor_pol"]
carbon_curves = [x for x in CC.curves if x.params.exchange in self.ConfigObj.CARBON_V1_FORKS]
not_carbon_curves = [x for x in CC.curves if x.params.exchange not in ["bancor_pol"] + self.ConfigObj.CARBON_V1_FORKS]
curve_combos = [[curve] + pol_curves for curve in not_carbon_curves]
non_carbon_curves = [x for x in CC.curves if x.params.exchange not in ["bancor_pol"] + self.ConfigObj.CARBON_V1_FORKS]
curve_combos = [[curve] + pol_curves for curve in non_carbon_curves]

if len(carbon_curves) > 0:
base_direction_pair = carbon_curves[0].pair
Expand Down
2 changes: 1 addition & 1 deletion fastlane_bot/modes/triangle_multi_complete.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def get_all_relevant_pairs_info(CCm, all_relevant_pairs, carbon_v1_forks):
if len(base_direction_one) > 0:
all_relevant_pairs_info[pair]['curves'].append(base_direction_one)
if len(base_direction_two) > 0:
all_relevant_pairs_info[pair]['curves'].append(base_direction_two)
all_relevant_pairs_info[pair]['curves'].append(base_direction_two)
all_relevant_pairs_info[pair]['all_counts'] = len(pair_curves)
all_relevant_pairs_info[pair]['carbon_counts'] = len(carbon_curves)
return all_relevant_pairs_info
Expand Down

0 comments on commit c0d5ea0

Please sign in to comment.