6
6
"fmt"
7
7
"sort"
8
8
9
- "github.com/btcsuite/btcd/chaincfg"
10
-
11
9
"github.com/lightningnetwork/lnd/queue"
12
10
13
11
"github.com/lightninglabs/loop"
@@ -20,10 +18,6 @@ import (
20
18
21
19
const completedSwapsCount = 5
22
20
23
- var (
24
- errNoMainnet = errors .New ("function not available on mainnet" )
25
- )
26
-
27
21
// swapClientServer implements the grpc service exposed by loopd.
28
22
type swapClientServer struct {
29
23
impl * loop.Client
@@ -268,10 +262,6 @@ func (s *swapClientServer) GetLoopInTerms(ctx context.Context, req *looprpc.Term
268
262
269
263
logger .Infof ("Loop in terms request received" )
270
264
271
- if s .lnd .ChainParams .Name == chaincfg .MainNetParams .Name {
272
- return nil , errNoMainnet
273
- }
274
-
275
265
terms , err := s .impl .LoopInTerms (ctx )
276
266
if err != nil {
277
267
logger .Errorf ("Terms request: %v" , err )
@@ -293,10 +283,6 @@ func (s *swapClientServer) GetLoopInQuote(ctx context.Context,
293
283
294
284
logger .Infof ("Loop in quote request received" )
295
285
296
- if s .lnd .ChainParams .Name == chaincfg .MainNetParams .Name {
297
- return nil , errNoMainnet
298
- }
299
-
300
286
quote , err := s .impl .LoopInQuote (ctx , & loop.LoopInQuoteRequest {
301
287
Amount : btcutil .Amount (req .Amt ),
302
288
HtlcConfTarget : defaultConfTarget ,
@@ -316,10 +302,6 @@ func (s *swapClientServer) LoopIn(ctx context.Context,
316
302
317
303
logger .Infof ("Loop in request received" )
318
304
319
- if s .lnd .ChainParams .Name == chaincfg .MainNetParams .Name {
320
- return nil , errNoMainnet
321
- }
322
-
323
305
req := & loop.LoopInRequest {
324
306
Amount : btcutil .Amount (in .Amt ),
325
307
MaxMinerFee : btcutil .Amount (in .MaxMinerFee ),
0 commit comments