@@ -11,7 +11,6 @@ import (
11
11
12
12
"github.com/lightninglabs/aperture/auth"
13
13
"github.com/lightninglabs/aperture/mint"
14
- "github.com/lightninglabs/lndclient"
15
14
"github.com/lightningnetwork/lnd/lnrpc"
16
15
"github.com/lightningnetwork/lnd/lntypes"
17
16
"google.golang.org/grpc"
@@ -66,23 +65,16 @@ const (
66
65
invoiceMacaroonName = "invoice.macaroon"
67
66
)
68
67
69
- // NewLndChallenger creates a new challenger that uses the given connection
70
- // details to connect to an lnd backend to create payment challenges.
71
- func NewLndChallenger (cfg * AuthConfig , genInvoiceReq InvoiceRequestGenerator ,
68
+ // NewLndChallenger creates a new challenger that uses the given connection to
69
+ // an lnd backend to create payment challenges.
70
+ func NewLndChallenger (client InvoiceClient ,
71
+ genInvoiceReq InvoiceRequestGenerator ,
72
72
errChan chan <- error ) (* LndChallenger , error ) {
73
73
74
74
if genInvoiceReq == nil {
75
75
return nil , fmt .Errorf ("genInvoiceReq cannot be nil" )
76
76
}
77
77
78
- client , err := lndclient .NewBasicClient (
79
- cfg .LndHost , cfg .TLSPath , cfg .MacDir , cfg .Network ,
80
- lndclient .MacFilename (invoiceMacaroonName ),
81
- )
82
- if err != nil {
83
- return nil , err
84
- }
85
-
86
78
invoicesMtx := & sync.Mutex {}
87
79
return & LndChallenger {
88
80
client : client ,
0 commit comments