Skip to content

Commit 704956c

Browse files
committed
bindings: update lightning python example
1 parent 4e195e1 commit 704956c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lwk_bindings/examples/lightning.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ def show_invoice(boltz_session, wollet):
177177
webhook = WebHook(webhook_url, status=[]) if webhook_url else None
178178
invoice_response = boltz_session.invoice(amount, "Lightning payment", claim_address, webhook)
179179

180+
fee = invoice_response.fee()
181+
print(f"Fee: {fee}")
182+
180183
# Get and print the bolt11 invoice
181184
bolt11_invoice_obj = invoice_response.bolt11_invoice()
182185
bolt11_invoice = str(bolt11_invoice_obj)
@@ -212,6 +215,9 @@ def pay_invoice(boltz_session, wollet, esplora_client, signer, skip_completion_t
212215
webhook = WebHook(webhook_url, status=[]) if webhook_url else None
213216
prepare_pay_response = boltz_session.prepare_pay(lightning_payment, refund_address, webhook)
214217

218+
fee = prepare_pay_response.fee()
219+
print(f"Fee: {fee}")
220+
215221
data=prepare_pay_response.serialize()
216222
swap_id=prepare_pay_response.swap_id()
217223

0 commit comments

Comments
 (0)