Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up payment events #755

Open
t-bast opened this issue Feb 10, 2025 · 1 comment
Open

Clean up payment events #755

t-bast opened this issue Feb 10, 2025 · 1 comment

Comments

@t-bast
Copy link
Member

t-bast commented Feb 10, 2025

We have a PaymentSent event in NodeEvents.kt but we also have another one in Peer.kt that extends the SendPaymentResult sealed class and contains more cases (PaymentNotSent and OfferNotPaid). But those are emitted on a different event flow (_eventsFlow). We should re-work those to provide a unified payment event interface emitted on a single event flow (maybe an event flow dedicated to payments would make sense?).

@pm47
Copy link
Member

pm47 commented Feb 10, 2025

Also, payInvoice() and payOffer() should have twins that immediately answer with a paymentId and do not wait for the payment to occur. Callers would rely on events to find out about payment attempts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants