From 7960849995882fb53c7197b10e0487ef4ca7647c Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Wed, 29 May 2019 16:31:32 -0700 Subject: [PATCH] rpcserver: thread payreq to PaymentCreationInfo --- rpcserver.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rpcserver.go b/rpcserver.go index 0ce2b783..eebed0d2 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -2875,6 +2875,7 @@ type rpcPaymentIntent struct { cltvDelta uint16 routeHints [][]zpay32.HopHint outgoingChannelID *uint64 + payReq []byte route *route.Route } @@ -2963,6 +2964,7 @@ func extractPaymentIntent(rpcPayReq *rpcPaymentRequest) (rpcPaymentIntent, error copy(payIntent.dest[:], destKey) payIntent.cltvDelta = uint16(payReq.MinFinalCLTVExpiry()) payIntent.routeHints = payReq.RouteHints + payIntent.payReq = []byte(rpcPayReq.PaymentRequest) return payIntent, nil } @@ -3071,6 +3073,7 @@ func (r *rpcServer) dispatchPaymentIntent( PaymentHash: payIntent.rHash, RouteHints: payIntent.routeHints, OutgoingChannelID: payIntent.outgoingChannelID, + PaymentRequest: payIntent.payReq, } // If the final CLTV value was specified, then we'll use that @@ -4149,6 +4152,7 @@ func (r *rpcServer) ListPayments(ctx context.Context, Path: path, Fee: int64(route.TotalFees().ToSatoshis()), PaymentPreimage: hex.EncodeToString(preimage[:]), + PaymentRequest: string(payment.Info.PaymentRequest), } }