mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
liquidity: respect feeppm if set for easyautoloop
This commit is contained in:
parent
319a519309
commit
64d2cbe5d6
1 changed files with 14 additions and 4 deletions
|
|
@ -600,11 +600,21 @@ 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{
|
||||
PartsPerMillion: defaultFeePPM,
|
||||
|
||||
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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue