Skip to content

Commit 8da0ea6

Browse files
committed
looprpc: add label to swap creation and display in list swaps
1 parent 9678c78 commit 8da0ea6

File tree

4 files changed

+182
-117
lines changed

4 files changed

+182
-117
lines changed

loopd/swapclient_server.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ func (s *swapClientServer) LoopOut(ctx context.Context,
8989
SwapPublicationDeadline: time.Unix(
9090
int64(in.SwapPublicationDeadline), 0,
9191
),
92+
Label: in.Label,
9293
}
9394

9495
switch {
@@ -214,6 +215,7 @@ func (s *swapClientServer) marshallSwap(loopSwap *loop.SwapInfo) (
214215
CostServer: int64(loopSwap.Cost.Server),
215216
CostOnchain: int64(loopSwap.Cost.Onchain),
216217
CostOffchain: int64(loopSwap.Cost.Offchain),
218+
Label: loopSwap.Label,
217219
}, nil
218220
}
219221

@@ -478,6 +480,7 @@ func (s *swapClientServer) LoopIn(ctx context.Context,
478480
MaxSwapFee: btcutil.Amount(in.MaxSwapFee),
479481
HtlcConfTarget: htlcConfTarget,
480482
ExternalHtlc: in.ExternalHtlc,
483+
Label: in.Label,
481484
}
482485
if in.LastHop != nil {
483486
lastHop, err := route.NewVertexFromBytes(in.LastHop)

0 commit comments

Comments
 (0)