Skip to content

Commit

Permalink
fixall checks
Browse files Browse the repository at this point in the history
  • Loading branch information
dni committed May 27, 2023
1 parent 38e720a commit e84e09f
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions boltz_client/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

config = BoltzConfig()


@click.group()
def command_group():
"""
Expand Down Expand Up @@ -50,7 +51,10 @@ def create_swap(payment_request):
click.echo()
click.echo("run this command if you need to refund:")
click.echo("CHANGE YOUR_RECEIVEADDRESS to your onchain address!!!")
click.echo(f"boltz refund-swap {refund_privkey_wif} {swap.address} YOUR_RECEIVEADDRESS {swap.redeemScript} {swap.timeoutBlockHeight}")
click.echo(
f"boltz refund-swap {refund_privkey_wif} {swap.address} YOUR_RECEIVEADDRESS "
f"{swap.redeemScript} {swap.timeoutBlockHeight}"
)


@click.command()
Expand Down Expand Up @@ -110,7 +114,10 @@ def create_reverse_swap(sats: int):
click.echo()
click.echo("run this command after you see the lockup transaction:")
click.echo("CHANGE YOUR_RECEIVEADDRESS to your onchain address!!!")
click.echo(f"boltz claim-reverse-swap {swap.lockupAddress} YOUR_RECEIVEADDRESS {claim_privkey_wif} {preimage_hex} {swap.redeemScript}")
click.echo(
f"boltz claim-reverse-swap {swap.lockupAddress} YOUR_RECEIVEADDRESS "
f"{claim_privkey_wif} {preimage_hex} {swap.redeemScript}"
)


@click.command()
Expand Down Expand Up @@ -195,16 +202,16 @@ def claim_reverse_swap(


@click.command()
@click.argument("id", type=str)
def swap_status(id):
@click.argument("swap_id", type=str)
def swap_status(swap_id):
"""
get swap status
retrieves the status of your boltz swap from the api
ID is the id of your boltz swap
"""
client = BoltzClient(config)
data = client.swap_status(id)
data = client.swap_status(swap_id)
click.echo(data)


Expand Down

0 comments on commit e84e09f

Please sign in to comment.