add margin to slider

This commit is contained in:
saml33 2023-07-25 13:08:43 +10:00
parent 7587eb2e00
commit d5bf0268b4
1 changed files with 12 additions and 10 deletions

View File

@ -423,16 +423,18 @@ export default function SpotMarketOrderSwapForm() {
</div>
</div>
{swapFormSizeUi === 'slider' ? (
<SwapSlider
useMargin={savedCheckboxSettings.margin}
amount={
side === 'buy'
? stringToNumberOrZero(quoteSize)
: stringToNumberOrZero(baseSize)
}
onChange={setAmountFromSlider}
step={1 / 10 ** (inputBank?.mintDecimals || 6)}
/>
<div className="mt-2">
<SwapSlider
useMargin={savedCheckboxSettings.margin}
amount={
side === 'buy'
? stringToNumberOrZero(quoteSize)
: stringToNumberOrZero(baseSize)
}
onChange={setAmountFromSlider}
step={1 / 10 ** (inputBank?.mintDecimals || 6)}
/>
</div>
) : (
<PercentageSelectButtons
amountIn={side === 'buy' ? quoteSize : baseSize}