File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -600,11 +600,21 @@ func (m *Manager) dispatchBestEasyAutoloopSwap(ctx context.Context) error {
600600 return err
601601 }
602602
603- // Override our current parameters in order to use the const percent
604- // limit of easy-autoloop.
603+ // If no fee is set, override our current parameters in order to use the
604+ // default percent limit of easy-autoloop.
605605 easyParams := m .params
606- easyParams .FeeLimit = & FeePortion {
607- PartsPerMillion : defaultFeePPM ,
606+
607+ switch feeLimit := easyParams .FeeLimit .(type ) {
608+ case * FeePortion :
609+ if feeLimit .PartsPerMillion == 0 {
610+ feeLimit = & FeePortion {
611+ PartsPerMillion : defaultFeePPM ,
612+ }
613+ }
614+ default :
615+ feeLimit = & FeePortion {
616+ PartsPerMillion : defaultFeePPM ,
617+ }
608618 }
609619
610620 // Set the swap outgoing channel to the chosen channel.
You can’t perform that action at this time.
0 commit comments