mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-03-13 11:35:56 +01:00
fix indentation
This commit is contained in:
parent
89266f9aa2
commit
6a262428cd
1 changed files with 18 additions and 20 deletions
|
@ -55,26 +55,24 @@ async def on_invoice_paid(payment: Payment) -> None:
|
|||
tagged = target.tag in payment.extra
|
||||
if tagged or target.percent > 0:
|
||||
|
||||
if tagged:
|
||||
memo = f"Pushed tagged payment to {target.alias}"
|
||||
amount_msat = int(amount_to_split)
|
||||
else:
|
||||
amount_msat = int(amount_to_split * target.percent / 100)
|
||||
memo = (
|
||||
f"Split payment: {target.percent}% for {target.alias or target.wallet}"
|
||||
if tagged:
|
||||
memo = f"Pushed tagged payment to {target.alias}"
|
||||
amount_msat = int(amount_to_split)
|
||||
else:
|
||||
amount_msat = int(amount_to_split * target.percent / 100)
|
||||
memo = f"Split payment: {target.percent}% for {target.alias or target.wallet}"
|
||||
|
||||
payment_hash, payment_request = await create_invoice(
|
||||
wallet_id=target.wallet,
|
||||
amount=int(amount_msat / 1000),
|
||||
internal=True,
|
||||
memo=memo,
|
||||
)
|
||||
|
||||
payment_hash, payment_request = await create_invoice(
|
||||
wallet_id=target.wallet,
|
||||
amount=int(amount_msat / 1000),
|
||||
internal=True,
|
||||
memo=memo,
|
||||
)
|
||||
extra = {**payment.extra, "splitted": True}
|
||||
|
||||
extra = {**payment.extra, "splitted": True}
|
||||
|
||||
await pay_invoice(
|
||||
payment_request=payment_request,
|
||||
wallet_id=payment.wallet_id,
|
||||
extra=extra,
|
||||
)
|
||||
await pay_invoice(
|
||||
payment_request=payment_request,
|
||||
wallet_id=payment.wallet_id,
|
||||
extra=extra,
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue