Rename rest
This commit is contained in:
parent
fa5be12e81
commit
bd99188f6e
@ -104,7 +104,7 @@ def _get_shortest_route(
|
|||||||
if len(other_swaps) == 0:
|
if len(other_swaps) == 0:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
shortest_route_rest = None
|
shortest_remaining_route = None
|
||||||
|
|
||||||
for next_swap in other_swaps:
|
for next_swap in other_swaps:
|
||||||
if start_swap.token_out_address == next_swap.token_in_address and (
|
if start_swap.token_out_address == next_swap.token_in_address and (
|
||||||
@ -119,15 +119,15 @@ def _get_shortest_route(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if shortest_from_next is not None and (
|
if shortest_from_next is not None and (
|
||||||
shortest_route_rest is None
|
shortest_remaining_route is None
|
||||||
or len(shortest_from_next) < len(shortest_route_rest)
|
or len(shortest_from_next) < len(shortest_remaining_route)
|
||||||
):
|
):
|
||||||
shortest_route_rest = shortest_from_next
|
shortest_remaining_route = shortest_from_next
|
||||||
|
|
||||||
if shortest_route_rest is None:
|
if shortest_remaining_route is None:
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
return [start_swap] + shortest_route_rest
|
return [start_swap] + shortest_remaining_route
|
||||||
|
|
||||||
|
|
||||||
def _get_all_start_end_swaps(swaps: List[Swap]) -> List[Tuple[Swap, List[Swap]]]:
|
def _get_all_start_end_swaps(swaps: List[Swap]) -> List[Tuple[Swap, List[Swap]]]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user