Skip to content

Commit 569359f

Browse files
committed
staticaddr: show swap amount in listswaps command
1 parent 025013e commit 569359f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

loopd/swapclient_server.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -1682,13 +1682,18 @@ func (s *swapClientServer) ListStaticAddressSwaps(ctx context.Context,
16821682
return nil, fmt.Errorf("error decoding swap invoice: "+
16831683
"%v", err)
16841684
}
1685+
1686+
swapAmount := swp.TotalDepositAmount()
1687+
if swp.SelectedAmount > 0 {
1688+
swapAmount = swp.SelectedAmount
1689+
}
16851690
swap := &looprpc.StaticAddressLoopInSwap{
16861691
SwapHash: swp.SwapHash[:],
16871692
DepositOutpoints: swp.DepositOutpoints,
16881693
State: toClientStaticAddressLoopInState(
16891694
swp.GetState(),
16901695
),
1691-
SwapAmountSatoshis: int64(swp.TotalDepositAmount()),
1696+
SwapAmountSatoshis: int64(swapAmount),
16921697
PaymentRequestAmountSatoshis: int64(
16931698
swapPayReq.MilliSat.ToSatoshis(),
16941699
),

0 commit comments

Comments
 (0)