From 319e28ef3f04c4c477c4ba23d9983fc0e39e25ce Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Fri, 6 Jan 2023 15:16:41 +0000 Subject: [PATCH] removed as it breaks tags. there's no % in tags --- lnbits/extensions/splitpayments/tasks.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lnbits/extensions/splitpayments/tasks.py b/lnbits/extensions/splitpayments/tasks.py index ca32ddcf..960e5fe6 100644 --- a/lnbits/extensions/splitpayments/tasks.py +++ b/lnbits/extensions/splitpayments/tasks.py @@ -36,9 +36,6 @@ async def on_invoice_paid(payment: Payment) -> None: if total_percent > 100: logger.error("splitpayment: total percent adds up to more than 100%") return - if not all([target.percent > 0 for target in targets]): - logger.error("splitpayment: not all percentages are positive > 0") - return logger.trace(f"splitpayments: performing split payments to {len(targets)} targets") @@ -52,7 +49,8 @@ async def on_invoice_paid(payment: Payment) -> None: return for target in targets: - tagged = target.tag in payment.extra + tagged = target.tag in payment.extra.values() + if tagged or target.percent > 0: if tagged: