Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix api endpoints to fund and open channels #523

Merged
merged 1 commit into from
May 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading