Merge pull request #3672 from breez/invoice-hints
Allow user specify routing hints in private invoice.
This commit is contained in:
5 files changed
+141
-2
No files matched your search
@@ -4730,6 +4730,11 @@ func (r *rpcServer) AddInvoice(ctx context.Context,
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Convert the passed routing hints to the required format.
|
||||
routeHints, err := invoicesrpc.CreateZpay32HopHints(invoice.RouteHints)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
addInvoiceData := &invoicesrpc.AddInvoiceData{
|
||||
Memo: invoice.Memo,
|
||||
Value: value,
|
||||
@@ -4738,6 +4743,7 @@ func (r *rpcServer) AddInvoice(ctx context.Context,
|
||||
FallbackAddr: invoice.FallbackAddr,
|
||||
CltvExpiry: invoice.CltvExpiry,
|
||||
Private: invoice.Private,
|
||||
RouteHints: routeHints,
|
||||
}
|
||||
|
||||
if invoice.RPreimage != nil {
|
||||
|
||||
Reference in new issue
Block a user