mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-04 18:01:57 +01:00
lncli: remove requirement for invoice value argument
This commit is contained in:
@@ -1168,9 +1168,10 @@ var addInvoiceCommand = cli.Command{
|
|||||||
Usage: "add a new invoice.",
|
Usage: "add a new invoice.",
|
||||||
Description: `
|
Description: `
|
||||||
Add a new invoice, expressing intent for a future payment.
|
Add a new invoice, expressing intent for a future payment.
|
||||||
|
|
||||||
The number of satoshis in this invoice is necessary for the creation,
|
Invoices without an amount can be created by not supplying any
|
||||||
the remaining parameters are optional.`,
|
parameters or providing an amount of 0. These invoices allow the payee
|
||||||
|
to specify the amount of satoshis they wish to send.`,
|
||||||
ArgsUsage: "value preimage",
|
ArgsUsage: "value preimage",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
@@ -1239,8 +1240,6 @@ func addInvoice(ctx *cli.Context) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("unable to decode amt argument: %v", err)
|
return fmt.Errorf("unable to decode amt argument: %v", err)
|
||||||
}
|
}
|
||||||
default:
|
|
||||||
return fmt.Errorf("amt argument missing")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
|
|||||||
Reference in New Issue
Block a user