Skip to content

Commit 5625af3

Browse files
committed
staticaddr: show swap amount in listswaps command
1 parent 3b9d383 commit 5625af3

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
@@ -1681,13 +1681,18 @@ func (s *swapClientServer) ListStaticAddressSwaps(ctx context.Context,
16811681
return nil, fmt.Errorf("error decoding swap invoice: "+
16821682
"%v", err)
16831683
}
1684+
1685+
swapAmount := swp.TotalDepositAmount()
1686+
if swp.SelectedAmount > 0 {
1687+
swapAmount = swp.SelectedAmount
1688+
}
16841689
swap := &looprpc.StaticAddressLoopInSwap{
16851690
SwapHash: swp.SwapHash[:],
16861691
DepositOutpoints: swp.DepositOutpoints,
16871692
State: toClientStaticAddressLoopInState(
16881693
swp.GetState(),
16891694
),
1690-
SwapAmountSatoshis: int64(swp.TotalDepositAmount()),
1695+
SwapAmountSatoshis: int64(swapAmount),
16911696
PaymentRequestAmountSatoshis: int64(
16921697
swapPayReq.MilliSat.ToSatoshis(),
16931698
),

0 commit comments

Comments
 (0)