66 "fmt"
77 "sort"
88
9- "github.com/btcsuite/btcd/chaincfg"
10-
119 "github.com/lightningnetwork/lnd/queue"
1210
1311 "github.com/lightninglabs/loop"
@@ -20,10 +18,6 @@ import (
2018
2119const completedSwapsCount = 5
2220
23- var (
24- errNoMainnet = errors .New ("function not available on mainnet" )
25- )
26-
2721// swapClientServer implements the grpc service exposed by loopd.
2822type swapClientServer struct {
2923 impl * loop.Client
@@ -268,10 +262,6 @@ func (s *swapClientServer) GetLoopInTerms(ctx context.Context, req *looprpc.Term
268262
269263 logger .Infof ("Loop in terms request received" )
270264
271- if s .lnd .ChainParams .Name == chaincfg .MainNetParams .Name {
272- return nil , errNoMainnet
273- }
274-
275265 terms , err := s .impl .LoopInTerms (ctx )
276266 if err != nil {
277267 logger .Errorf ("Terms request: %v" , err )
@@ -293,10 +283,6 @@ func (s *swapClientServer) GetLoopInQuote(ctx context.Context,
293283
294284 logger .Infof ("Loop in quote request received" )
295285
296- if s .lnd .ChainParams .Name == chaincfg .MainNetParams .Name {
297- return nil , errNoMainnet
298- }
299-
300286 quote , err := s .impl .LoopInQuote (ctx , & loop.LoopInQuoteRequest {
301287 Amount : btcutil .Amount (req .Amt ),
302288 HtlcConfTarget : defaultConfTarget ,
@@ -316,10 +302,6 @@ func (s *swapClientServer) LoopIn(ctx context.Context,
316302
317303 logger .Infof ("Loop in request received" )
318304
319- if s .lnd .ChainParams .Name == chaincfg .MainNetParams .Name {
320- return nil , errNoMainnet
321- }
322-
323305 req := & loop.LoopInRequest {
324306 Amount : btcutil .Amount (in .Amt ),
325307 MaxMinerFee : btcutil .Amount (in .MaxMinerFee ),
0 commit comments