lndclient icon indicating copy to clipboard operation
lndclient copied to clipboard

Router SendPayment does not parse Amount when Invoice with dynamic value is set.

Open zoop-btc opened this issue 1 year ago • 2 comments
trafficstars

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?

zoop-btc avatar Jan 29 '24 20:01 zoop-btc

I think this is probably a left-over case from back when zero-amount invoices were unsafe. Should probably be fixed in lndclient.

guggero avatar Jan 30 '24 17:01 guggero

I have started to use lnrpc.LightningClient.SendPaymentSync instead and subscribe to status updates immediately after as a workaround.

zoop-btc avatar Feb 02 '24 08:02 zoop-btc