liquidity: respect feeppm if set for easyautoloop

pull/595/head
George Tsagkarelis 12 months ago
parent 319a519309
commit 64d2cbe5d6
No known key found for this signature in database
GPG Key ID: 0807D1013F48208A

@ -600,12 +600,22 @@ func (m *Manager) dispatchBestEasyAutoloopSwap(ctx context.Context) error {
return err
}
// Override our current parameters in order to use the const percent
// limit of easy-autoloop.
// If no fee is set, override our current parameters in order to use the
// default percent limit of easy-autoloop.
easyParams := m.params
easyParams.FeeLimit = &FeePortion{
switch feeLimit := easyParams.FeeLimit.(type) {
case *FeePortion:
if feeLimit.PartsPerMillion == 0 {
feeLimit = &FeePortion{
PartsPerMillion: defaultFeePPM,
}
}
default:
feeLimit = &FeePortion{
PartsPerMillion: defaultFeePPM,
}
}
// Set the swap outgoing channel to the chosen channel.
outgoing := []lnwire.ShortChannelID{

Loading…
Cancel
Save