mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-08 05:08:13 +02:00
cmd/lncli: fix nil map in payment req [skip ci]
Fixes #5989. Fixes a panic in lncli if a payment request and the --data flag is used at the same time.
This commit is contained in:
@@ -291,8 +291,9 @@ func sendPayment(ctx *cli.Context) error {
|
|||||||
// details of the payment are encoded within the request.
|
// details of the payment are encoded within the request.
|
||||||
if ctx.IsSet("pay_req") {
|
if ctx.IsSet("pay_req") {
|
||||||
req := &routerrpc.SendPaymentRequest{
|
req := &routerrpc.SendPaymentRequest{
|
||||||
PaymentRequest: ctx.String("pay_req"),
|
PaymentRequest: ctx.String("pay_req"),
|
||||||
Amt: ctx.Int64("amt"),
|
Amt: ctx.Int64("amt"),
|
||||||
|
DestCustomRecords: make(map[uint64][]byte),
|
||||||
}
|
}
|
||||||
|
|
||||||
// We'll attempt to parse a payment address as well, given that
|
// We'll attempt to parse a payment address as well, given that
|
||||||
|
Reference in New Issue
Block a user