-
Notifications
You must be signed in to change notification settings - Fork 60
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
How can I monitor incoming payments? #160
Comments
You could try subscribeToForwards balance changing overall does not have an API |
First, thank you Alex for the lightning-fast response! |
Actually seems like this one returns the balance in similar way as invoice subscription, with the value which then changes without any way to detect it. Probably I can just run a background service which would query via rpc periodically, like every 5 seconds? |
Yes since there is no balance changing API you can do polling |
I can subscribe to outcoming payments with this:
When I get this event, I fetch the balance via calling
getChainBalance()
which returns me the accurate updated balance.However, when I create an invoice and pay it from another wallet, I only see this option to track the event of the incoming payment:
But, it won't return the accurate updated balance sometimes. It returns some balance but then it changes and this is not accurate.
So, I hope there is some other subscription I can use to see the fact of the balance change.
Is there any?
Thanks!
The text was updated successfully, but these errors were encountered: