@@ -1924,14 +1924,17 @@ func (s *swapClientServer) ListStaticAddressSwaps(ctx context.Context,
19241924 }
19251925 }
19261926
1927+ swapAmount := swp .TotalDepositAmount ()
19271928 state := toClientStaticAddressLoopInState (swp .GetState ())
1928- swapAmount := int64 (swp .TotalDepositAmount ())
19291929 payReqAmount := int64 (swapPayReq .MilliSat .ToSatoshis ())
1930+ if swp .SelectedAmount > 0 {
1931+ swapAmount = swp .SelectedAmount
1932+ }
19301933 swap := & looprpc.StaticAddressLoopInSwap {
19311934 SwapHash : swp .SwapHash [:],
19321935 DepositOutpoints : swp .DepositOutpoints ,
19331936 State : state ,
1934- SwapAmountSatoshis : swapAmount ,
1937+ SwapAmountSatoshis : int64 ( swapAmount ) ,
19351938 PaymentRequestAmountSatoshis : payReqAmount ,
19361939 Deposits : protoDeposits ,
19371940 }
@@ -1944,9 +1947,9 @@ func (s *swapClientServer) ListStaticAddressSwaps(ctx context.Context,
19441947 }, nil
19451948}
19461949
1947- // GetStaticAddressSummary returns a summary static address related information.
1948- // Amongst deposits and withdrawals and their total values it also includes a
1949- // list of detailed deposit information filtered by their state.
1950+ // GetStaticAddressSummary returns a summary of static address- related
1951+ // information. Amongst deposits and withdrawals and their total values, it also
1952+ // includes a list of detailed deposit information filtered by their state.
19501953func (s * swapClientServer ) GetStaticAddressSummary (ctx context.Context ,
19511954 _ * looprpc.StaticAddressSummaryRequest ) (
19521955 * looprpc.StaticAddressSummaryResponse , error ) {
0 commit comments