From 1be4ac9e98a9994b3b3d2104e372dc24b24e6c5f Mon Sep 17 00:00:00 2001 From: Jonathan Harvey-Buschel Date: Fri, 30 Aug 2024 16:56:24 -0400 Subject: [PATCH] cmd/litcli: pass peer pubkey for payinvoice CLI --- cmd/litcli/ln.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/litcli/ln.go b/cmd/litcli/ln.go index 4a6e88787..c261910f9 100644 --- a/cmd/litcli/ln.go +++ b/cmd/litcli/ln.go @@ -433,6 +433,12 @@ func payInvoice(ctx *cli.Context) error { var assetID asset.ID copy(assetID[:], assetIDBytes) + rfqPeerKey, err := hex.DecodeString(ctx.String(rfqPeerPubKeyFlag.Name)) + if err != nil { + return fmt.Errorf("unable to decode RFQ peer public key: "+ + "%w", err) + } + tapdConn, cleanup, err := connectTapdClient(ctx) if err != nil { return fmt.Errorf("error creating tapd connection: %w", err) @@ -457,6 +463,7 @@ func payInvoice(ctx *cli.Context) error { stream, err := tchrpcClient.SendPayment( ctx, &tchrpc.SendPaymentRequest{ AssetId: assetIDBytes, + PeerPubkey: rfqPeerKey, PaymentRequest: req, }, )