@@ -1925,14 +1925,17 @@ func (s *swapClientServer) ListStaticAddressSwaps(ctx context.Context,
19251925 }
19261926 }
19271927
1928+ swapAmount := swp .TotalDepositAmount ()
19281929 state := toClientStaticAddressLoopInState (swp .GetState ())
1929- swapAmount := int64 (swp .TotalDepositAmount ())
19301930 payReqAmount := int64 (swapPayReq .MilliSat .ToSatoshis ())
1931+ if swp .SelectedAmount > 0 {
1932+ swapAmount = swp .SelectedAmount
1933+ }
19311934 swap := & looprpc.StaticAddressLoopInSwap {
19321935 SwapHash : swp .SwapHash [:],
19331936 DepositOutpoints : swp .DepositOutpoints ,
19341937 State : state ,
1935- SwapAmountSatoshis : swapAmount ,
1938+ SwapAmountSatoshis : int64 ( swapAmount ) ,
19361939 PaymentRequestAmountSatoshis : payReqAmount ,
19371940 Deposits : protoDeposits ,
19381941 }
@@ -1945,9 +1948,9 @@ func (s *swapClientServer) ListStaticAddressSwaps(ctx context.Context,
19451948 }, nil
19461949}
19471950
1948- // GetStaticAddressSummary returns a summary static address related information.
1949- // Amongst deposits and withdrawals and their total values it also includes a
1950- // list of detailed deposit information filtered by their state.
1951+ // GetStaticAddressSummary returns a summary of static address- related
1952+ // information. Amongst deposits and withdrawals and their total values, it also
1953+ // includes a list of detailed deposit information filtered by their state.
19511954func (s * swapClientServer ) GetStaticAddressSummary (ctx context.Context ,
19521955 _ * looprpc.StaticAddressSummaryRequest ) (
19531956 * looprpc.StaticAddressSummaryResponse , error ) {
0 commit comments