mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
lncli: add label flag to send many and send coins
This commit is contained in:
parent
93a1b61218
commit
52137459e4
@ -194,6 +194,11 @@ func estimateFees(ctx *cli.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
var txLabelFlag = cli.StringFlag{
|
||||
Name: "label",
|
||||
Usage: "(optional) a label for the transaction",
|
||||
}
|
||||
|
||||
var sendCoinsCommand = cli.Command{
|
||||
Name: "sendcoins",
|
||||
Category: "On-chain",
|
||||
@ -236,6 +241,7 @@ var sendCoinsCommand = cli.Command{
|
||||
"sat/byte that should be used when crafting " +
|
||||
"the transaction",
|
||||
},
|
||||
txLabelFlag,
|
||||
},
|
||||
Action: actionDecorator(sendCoins),
|
||||
}
|
||||
@ -295,6 +301,7 @@ func sendCoins(ctx *cli.Context) error {
|
||||
TargetConf: int32(ctx.Int64("conf_target")),
|
||||
SatPerByte: ctx.Int64("sat_per_byte"),
|
||||
SendAll: ctx.Bool("sweepall"),
|
||||
Label: ctx.String(txLabelFlag.Name),
|
||||
}
|
||||
txid, err := client.SendCoins(ctxb, req)
|
||||
if err != nil {
|
||||
@ -450,6 +457,7 @@ var sendManyCommand = cli.Command{
|
||||
Usage: "(optional) a manual fee expressed in sat/byte that should be " +
|
||||
"used when crafting the transaction",
|
||||
},
|
||||
txLabelFlag,
|
||||
},
|
||||
Action: actionDecorator(sendMany),
|
||||
}
|
||||
@ -475,6 +483,7 @@ func sendMany(ctx *cli.Context) error {
|
||||
AddrToAmount: amountToAddr,
|
||||
TargetConf: int32(ctx.Int64("conf_target")),
|
||||
SatPerByte: ctx.Int64("sat_per_byte"),
|
||||
Label: ctx.String(txLabelFlag.Name),
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user