Open LukasBahrenberg opened 1 year ago
Hi, we are planning to implement webln.sendPaymentAsync
. Unfortunately we will have no callback for now, as normally waiting for the invoice to settle times out in the http request of the connector.
Also: allowances/remember me won't be supported initially, as we cannot easily track the status of HODL payments in the extension.
Feature description
In the case of HODL invoices it should be possible to pay multiple HODL invoices in a row w/o waiting for a successful settlement of previous ones.
The idea behind HODL invoices is that the preimage revelation / invoice settlement is not done immediately by the recipent upon receiving a payment. Instead, it can be revealed depending on some external condition at some point in the future.
Describe the solution
A solution in Alby could be to not wait for the standard response meaning an immediate revelation of the preimage when paying a HODL invoice.
Describe alternatives
@reneaaron suggested in #2142:
Additional context
This issue is related to PR #2151 and the original issue #2142.
I tested the
webln.request()
methodsaddholdinvoice
andsettleinvoice
when connected to LND via Alby/REST. It works except for one (minor) thing:I set a "remember" in Alby for
webln.sendPayment()
with a budget for my test site allowing me to make multiple payments in a row non-interactively. Now, if I try to pay multiple HODL invoices in a row, it throws me the following error and prevents me from runningwebln.sendPayment()
again:I suppose this has to do with getting no response for
webln.sendPayment()
in case of paying a HODL invoice. This is not too bad as e.g. a page reload solves this. I wonder, however, what happens in the background. Is Alby still waiting for a response for all the paid HODL invoices? Does this accumulate somehow?@bumi answered to this:
Are you working on this?
None