You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 23, 2021. It is now read-only.
So one the decoder side, we can detect this at it has no true value:
"num_satoshis": "0",
When we try to pay an invoice like this into the UI atm we see something like this
When the user clicks to pay, then it gets rejected as lnd detects there's no value attached to the send request.
If we wan to support this use case, we'll need to:
Detect this special type of invoice while we're validating the user data
Modify the currently static "send payment" UI fragment to be conditionally dynamic if there's a zero valued invoice. In this case, the user would get some sort of text saying they should specify the amount since it's a tip/donation.
Take that value and specify it in the SendRequest proto along side the invoice. Here's an example of how we do it in lnd/Go: https://github.com/lightningnetwork/lnd/blob/master/cmd/lncli/commands.go#L2255. Notice that we set both the invoice and the amount. If the amount is zero, then lnd will just use the invoice. But if it's set, then lnd knows what do to with it all.