Skip to content

Commit 2ac4057

Browse files
GeorgeTsagkguggero
authored andcommitted
lndclient: thread through all params for AddHoldInvoice
1 parent afb4b2d commit 2ac4057

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

invoices_client.go

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package lndclient
33
import (
44
"context"
55
"errors"
6+
"fmt"
67
"io"
78
"sync"
89
"time"
@@ -228,13 +229,21 @@ func (s *invoicesClient) AddHoldInvoice(ctx context.Context,
228229
rpcCtx, cancel := context.WithTimeout(ctx, s.timeout)
229230
defer cancel()
230231

232+
routeHints, err := marshallRouteHints(in.RouteHints)
233+
if err != nil {
234+
return "", fmt.Errorf("failed to marshal route hints: %v", err)
235+
}
236+
231237
rpcIn := &invoicesrpc.AddHoldInvoiceRequest{
232-
Memo: in.Memo,
233-
Hash: in.Hash[:],
234-
ValueMsat: int64(in.Value),
235-
Expiry: in.Expiry,
236-
CltvExpiry: in.CltvExpiry,
237-
Private: true,
238+
Memo: in.Memo,
239+
Hash: in.Hash[:],
240+
ValueMsat: int64(in.Value),
241+
Expiry: in.Expiry,
242+
CltvExpiry: in.CltvExpiry,
243+
Private: in.Private,
244+
RouteHints: routeHints,
245+
DescriptionHash: in.DescriptionHash,
246+
FallbackAddr: in.FallbackAddr,
238247
}
239248

240249
rpcCtx = s.invoiceMac.WithMacaroonAuth(rpcCtx)

0 commit comments

Comments
 (0)