mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loop+cmd: extract types into swap module
This commit is contained in:
parent
7a1680d7d6
commit
69f2af9fdc
13 changed files with 104 additions and 89 deletions
|
|
@ -11,6 +11,7 @@ import (
|
|||
"github.com/lightninglabs/loop"
|
||||
"github.com/lightninglabs/loop/lndclient"
|
||||
"github.com/lightninglabs/loop/loopdb"
|
||||
"github.com/lightninglabs/loop/swap"
|
||||
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/lightninglabs/loop/looprpc"
|
||||
|
|
@ -113,9 +114,9 @@ func (s *swapClientServer) marshallSwap(loopSwap *loop.SwapInfo) (
|
|||
|
||||
var swapType looprpc.SwapType
|
||||
switch loopSwap.SwapType {
|
||||
case loop.TypeIn:
|
||||
case swap.TypeIn:
|
||||
swapType = looprpc.SwapType_LOOP_IN
|
||||
case loop.TypeOut:
|
||||
case swap.TypeOut:
|
||||
swapType = looprpc.SwapType_LOOP_OUT
|
||||
default:
|
||||
return nil, errors.New("unknown swap type")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue