correct amount on invoice
This commit is contained in:
parent
41faf42afe
commit
bc0d86c771
1 changed files with 2 additions and 1 deletions
|
|
@ -49,12 +49,13 @@ async def on_invoice_paid(payment: Payment) -> None:
|
||||||
if target.percent > 0:
|
if target.percent > 0:
|
||||||
tagged = target.tag in payment.extra
|
tagged = target.tag in payment.extra
|
||||||
|
|
||||||
amount = int(payment.amount * target.percent / 100) # msats
|
amount = int(amount_to_split * target.percent / 100) # msats
|
||||||
memo = (
|
memo = (
|
||||||
f"split payment: {target.percent}% for {target.alias or target.wallet}"
|
f"split payment: {target.percent}% for {target.alias or target.wallet}"
|
||||||
)
|
)
|
||||||
if tagged:
|
if tagged:
|
||||||
memo = f"Pushed tagged payment to {target.alias}"
|
memo = f"Pushed tagged payment to {target.alias}"
|
||||||
|
amount = int(amount_to_split)
|
||||||
|
|
||||||
payment_hash, payment_request = await create_invoice(
|
payment_hash, payment_request = await create_invoice(
|
||||||
wallet_id=target.wallet,
|
wallet_id=target.wallet,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue