mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-03-13 11:35:56 +01:00
add amount to livestream
This commit is contained in:
parent
c8cdf2f1d2
commit
1032ad3417
1 changed files with 8 additions and 5 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue