Skip to content

Commit

Permalink
See previous.
Browse files Browse the repository at this point in the history
  • Loading branch information
dowlandaiello committed Oct 14, 2024
1 parent f1cf81a commit 107e1b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/strategies/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -964,16 +964,16 @@ async def transfer(
)
)

if not ibc_route or len(ibc_route) == 0:
raise ValueError(f"No route from {denom} to {leg.backend.chain_id}")

ctx.log_route(
route,
"info",
"Got potential transfer route: %s",
[fmt_denom_route_leg(leg) for leg in ibc_route],
)

if not ibc_route or len(ibc_route) == 0:
raise ValueError(f"No route from {denom} to {leg.backend.chain_id}")

src_channel_id = ibc_route[0].channel
sender_addr = str(
Address(ctx.wallet.public_key(), prefix=ibc_route[0].from_chain.bech32_prefix)
Expand Down
4 changes: 1 addition & 3 deletions src/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,7 @@ def load_denom_route_leg(obj: dict[str, Any]) -> DenomRouteLeg:


def fmt_denom_route_leg(leg: DenomRouteLeg) -> str:
return (
f"{src_denom} ({src_chain}) -> {dest_denom} ({dest_chain}) via {channel}/{port}"
)
return f"{leg.src_denom} ({leg.src_chain}) -> {leg.dest_denom} ({leg.dest_chain}) via {leg.channel}/{leg.port}"


@dataclass
Expand Down

0 comments on commit 107e1b4

Please sign in to comment.