From 1032ad34177cadbe2fb02b61f9d74d0eae7ccfa8 Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Fri, 6 Jan 2023 12:45:55 +0000 Subject: [PATCH] add amount to livestream --- lnbits/extensions/livestream/lnurl.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lnbits/extensions/livestream/lnurl.py b/lnbits/extensions/livestream/lnurl.py index efe7986d5..63523f339 100644 --- a/lnbits/extensions/livestream/lnurl.py +++ b/lnbits/extensions/livestream/lnurl.py @@ -86,16 +86,19 @@ async def lnurl_callback( ls = await get_livestream_by_track(track_id) - extra_amount = amount_received - int( - amount_received * (100 - ls.fee_pct) / 100 - ) # msats + extra_amount = amount_received - int(amount_received * (100 - ls.fee_pct) / 100) payment_hash, payment_request = await create_invoice( wallet_id=ls.wallet, - amount=int(amount_received / 1000), # sats + amount=int(amount_received / 1000), memo=await track.fullname(), unhashed_description=(await track.lnurlpay_metadata()).encode(), - extra={"tag": "livestream", "track": track.id, "comment": comment}, + extra={ + "tag": "livestream", + "track": track.id, + "comment": comment, + "amount": int(extra_amount / 1000), + }, ) if amount_received < track.price_msat: