@@ -1868,14 +1868,17 @@ func (s *swapClientServer) ListStaticAddressSwaps(ctx context.Context,
1868
1868
}
1869
1869
}
1870
1870
1871
+ swapAmount := swp .TotalDepositAmount ()
1871
1872
state := toClientStaticAddressLoopInState (swp .GetState ())
1872
- swapAmount := int64 (swp .TotalDepositAmount ())
1873
1873
payReqAmount := int64 (swapPayReq .MilliSat .ToSatoshis ())
1874
+ if swp .SelectedAmount > 0 {
1875
+ swapAmount = swp .SelectedAmount
1876
+ }
1874
1877
swap := & looprpc.StaticAddressLoopInSwap {
1875
1878
SwapHash : swp .SwapHash [:],
1876
1879
DepositOutpoints : swp .DepositOutpoints ,
1877
1880
State : state ,
1878
- SwapAmountSatoshis : swapAmount ,
1881
+ SwapAmountSatoshis : int64 ( swapAmount ) ,
1879
1882
PaymentRequestAmountSatoshis : payReqAmount ,
1880
1883
Deposits : protoDeposits ,
1881
1884
}
@@ -1888,9 +1891,9 @@ func (s *swapClientServer) ListStaticAddressSwaps(ctx context.Context,
1888
1891
}, nil
1889
1892
}
1890
1893
1891
- // GetStaticAddressSummary returns a summary static address related information.
1892
- // Amongst deposits and withdrawals and their total values it also includes a
1893
- // list of detailed deposit information filtered by their state.
1894
+ // GetStaticAddressSummary returns a summary of static address- related
1895
+ // information. Amongst deposits and withdrawals and their total values, it also
1896
+ // includes a list of detailed deposit information filtered by their state.
1894
1897
func (s * swapClientServer ) GetStaticAddressSummary (ctx context.Context ,
1895
1898
_ * looprpc.StaticAddressSummaryRequest ) (
1896
1899
* looprpc.StaticAddressSummaryResponse , error ) {
0 commit comments