lndclient
lndclient copied to clipboard
Router SendPayment does not parse Amount when Invoice with dynamic value is set.
https://github.com/lightninglabs/lndclient/blob/67d851af8b541c231dd9bd1abb1842eba05a4dfe/router_client.go#L425
When sending a payment with the parameters request.Invoice set to a 0 amount invoice as well as request.Amount set it will still submit it without the amount as opposed to what is expected for a dynamic value invoice.
I tried it with this invoice. This will result in rpc error: code = Unknown desc = amount must be specified when paying a zero amount invoice
Or is this expected and I have to replace the 0 amount invoice myself first?
I think this is probably a left-over case from back when zero-amount invoices were unsafe. Should probably be fixed in lndclient.
I have started to use lnrpc.LightningClient.SendPaymentSync instead and subscribe to status updates immediately after as a workaround.