question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Split Payments Extension Not Firing Split Events on core api send_events

See original GitHub issue

Commit version: e6bf9797a4f5e04c75d341256274deb47e352d0f

This is not happening for me.

When the source wallet receives a payment, the extension will automatically split the corresponding values to every wallet

The invoice paid event never gets fired, even though the listener is registered…

what I am expecting is that when core api calls the send_events method

    async def send_events():
        print("send_events")
        try:
            async for typ, data in event_to_send:
                message = [f"event: {typ}".encode("utf-8")]

                if data:
                    jdata = json.dumps(dict(data._asdict(), pending=False))
                    message.append(f"data: {jdata}".encode("utf-8"))

                yield b"\n".join(message) + b"\r\n\r\n"
        except trio.Cancelled:
            return

that the splt payment on payment event is fired

async def on_invoice_paid(payment: Payment) -> None:
    print(f"on_invoice_paid: {payment}")
    if "splitpayments" == payment.extra.get("tag") or payment.extra.get("splitted"):
        # already splitted, ignore
        return

This is not occurring, the transaction settles as if there were no registered splits:

check_invoice_status services
 - marking 'in' lntx_2iBumwlR97nqZZ5W54l7pAX as not pending anymore: settled

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
fiatjafcommented, Nov 22, 2021

What is the funding source?

0reactions
claytantorcommented, Nov 22, 2021

For LNPay you must set up webhooks manually otherwise none of the reactive things will work. Please see the docs somewhere I don’t remember for more information.

HELPFUL! Will attempt and reopen a different issues if I find.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sending Events to Split through the API
Sending Events via the Split API 9:08 Nov 7, 2018 Describes how to send events, for creating metrics, to Split using the API....
Read more >
Split payments - - The Events Calendar
It is absolutely crucial that I can split payments for events. Because of the volume going through our existing site it is not...
Read more >
Sending Events via the Split API - YouTube
Describes how to send events, for creating metrics, to Split using the API.
Read more >
Implementation Guide For Events In Google Analytics 4
When you look at the data in GA4, this one single page_view event actually splits into three separate GA4 events! Event split. If...
Read more >
Splitting the System | Packt
events, is not a real issue. The code repository for this chapter contains a working example, where commands are being sent to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found