MarketBuilder slippage fix
This commit is contained in:
@@ -36,11 +36,13 @@ const slippage = computed({
|
||||
set(v) {props.builder.slippage=v/100; emit('update:builder', props.builder)}
|
||||
})
|
||||
|
||||
const MIN_SLIPPAGE = 0.01;
|
||||
|
||||
function buildTranches() {
|
||||
let warnings = []
|
||||
if (slippage.value < 0.01)
|
||||
if (slippage.value < MIN_SLIPPAGE)
|
||||
warnings.push('Slippage will be set to the minimum of 0.01%')
|
||||
const slip = Math.min(slippage.value, 0.01)
|
||||
const slip = Math.max(slippage.value, MIN_SLIPPAGE)
|
||||
return {
|
||||
tranches: [newTranche({slippage: slip / 100})],
|
||||
warnings,
|
||||
|
||||
Reference in New Issue
Block a user