import useMangoAccount from 'hooks/useMangoAccount'
import LeverageSlider from '../shared/LeverageSlider'
import { useTokenMax } from './useTokenMax'
const SwapSlider = ({
amount,
onChange,
useMargin,
step,
}: {
amount: number
onChange: (x: string) => void
useMargin: boolean
step: number
}) => {
const { mangoAccount } = useMangoAccount()
const { amount: tokenMax, amountWithBorrow } = useTokenMax(useMargin)
return (
<>
{!mangoAccount ? (
) : (
)}
>
)
}
export default SwapSlider