Skip to content

Commit

Permalink
Fix api endpoints to fund and open channels (#523)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeandemeusy authored May 27, 2024
1 parent 2bf83ff commit 8af81c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ct-app/core/components/hoprd_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ async def open_channel(self, peer_address: str, amount: str):
body = OpenChannelBodyRequest(amount, peer_address)

is_ok, response = await self.__call_api(
ChannelsApi, "channels_open_channel", body=body
ChannelsApi, "open_channel", body=body
)

return response.channel_id if is_ok else None
Expand All @@ -157,7 +157,7 @@ async def fund_channel(self, channel_id: str, amount: float):
"""
body = FundBodyRequest(amount=f"{amount:.0f}")
is_ok, _ = await self.__call_api(
ChannelsApi, "fund_channel", channelid=channel_id, body=body
ChannelsApi, "fund_channel", channel_id=channel_id, body=body
)

return is_ok
Expand All @@ -169,7 +169,7 @@ async def close_channel(self, channel_id: str):
:return: bool
"""
is_ok, _ = await self.__call_api(
ChannelsApi, "close_channel", channelid=channel_id
ChannelsApi, "close_channel", channel_id=channel_id
)
return is_ok

Expand Down

0 comments on commit 8af81c4

Please sign in to comment.