@@ -845,19 +845,10 @@ func (m *Manager) getSwapRestrictions(ctx context.Context, swapType swap.Type) (
845845// the prepay because they failed to sweep the on chain htlc. This is unlikely,
846846// because we expect clients to be online to sweep, but we want to account for
847847// every outcome so we include it.
848- func worstCaseOutFees (prepayRouting , swapRouting , swapFee , minerFee ,
849- prepayAmount btcutil.Amount ) btcutil.Amount {
848+ func worstCaseOutFees (prepayRouting , swapRouting , swapFee ,
849+ minerFee btcutil.Amount ) btcutil.Amount {
850850
851- var (
852- successFees = prepayRouting + minerFee + swapFee + swapRouting
853- noShowFees = prepayRouting + prepayAmount
854- )
855-
856- if noShowFees > successFees {
857- return noShowFees
858- }
859-
860- return successFees
851+ return prepayRouting + minerFee + swapFee + swapRouting
861852}
862853
863854// existingAutoLoopSummary provides a summary of the existing autoloops which
@@ -910,19 +901,11 @@ func (m *Manager) checkExistingAutoLoops(ctx context.Context,
910901 if out .State ().State .Type () == loopdb .StateTypePending {
911902 summary .inFlightCount ++
912903
913- prepay , err := m .cfg .Lnd .Client .DecodePaymentRequest (
914- ctx , out .Contract .PrepayInvoice ,
915- )
916- if err != nil {
917- return nil , err
918- }
919-
920904 summary .pendingFees += worstCaseOutFees (
921905 out .Contract .MaxPrepayRoutingFee ,
922906 out .Contract .MaxSwapRoutingFee ,
923907 out .Contract .MaxSwapFee ,
924908 out .Contract .MaxMinerFee ,
925- mSatToSatoshis (prepay .Value ),
926909 )
927910 } else if out .LastUpdateTime ().After (
928911 m .params .AutoloopBudgetLastRefresh ,
0 commit comments