mirror of
https://github.com/lnbits/lnbits.git
synced 2025-04-08 03:48:30 +02:00
tags don't have percent
This commit is contained in:
parent
70899994fe
commit
c8cdf2f1d2
@ -44,8 +44,8 @@ async def on_invoice_paid(payment: Payment) -> None:
|
||||
amount_to_split = (payment.extra.get("amount") or 0) * 1000
|
||||
|
||||
for target in targets:
|
||||
if target.percent > 0:
|
||||
tagged = target.tag in payment.extra
|
||||
tagged = target.tag in payment.extra
|
||||
if tagged or target.percent > 0:
|
||||
|
||||
amount = int(amount_to_split * target.percent / 100)
|
||||
memo = (
|
||||
@ -64,7 +64,7 @@ async def on_invoice_paid(payment: Payment) -> None:
|
||||
|
||||
logger.debug(f"created split invoice: {payment_hash}")
|
||||
|
||||
extra = {**payment.extra, "splitted": True}
|
||||
extra = {**payment.extra, "tag": "splitpayments", "splitted": True}
|
||||
|
||||
checking_id = await pay_invoice(
|
||||
payment_request=payment_request,
|
||||
|
Loading…
x
Reference in New Issue
Block a user