fix negative deposit cap, make trade pair selected button (#695)
This commit is contained in:
parent
dfce8d6a12
commit
532316e955
@ -33,7 +33,7 @@ export default function DepositCapMessage(props: Props) {
|
|||||||
<div key={coin.denom} className='flex gap-1'>
|
<div key={coin.denom} className='flex gap-1'>
|
||||||
<Text size='xs'>Cap Left:</Text>
|
<Text size='xs'>Cap Left:</Text>
|
||||||
<FormattedNumber
|
<FormattedNumber
|
||||||
amount={coin.amount.toNumber()}
|
amount={Math.max(coin.amount.toNumber(), 0)}
|
||||||
options={{
|
options={{
|
||||||
decimals: asset.decimals,
|
decimals: asset.decimals,
|
||||||
maxDecimals: asset.decimals,
|
maxDecimals: asset.decimals,
|
||||||
|
@ -35,18 +35,21 @@ export default function AssetSelectorPair(props: Props) {
|
|||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='flex items-center justify-between w-full p-3 bg-white/5'>
|
<>
|
||||||
<Text size='sm' className='text-white/60'>
|
|
||||||
<span className='text-white'>{buyAsset.symbol}</span>/{sellAsset.symbol}
|
|
||||||
</Text>
|
|
||||||
<Button
|
<Button
|
||||||
onClick={() => useStore.setState({ assetOverlayState: 'pair' })}
|
|
||||||
text='all markets'
|
|
||||||
color='quaternary'
|
color='quaternary'
|
||||||
variant='transparent'
|
variant='transparent'
|
||||||
className='pr-0'
|
onClick={() => useStore.setState({ assetOverlayState: 'pair' })}
|
||||||
rightIcon={<ChevronDown className='w-3 h-3' />}
|
className='flex items-center justify-between w-full py-5 bg-white/5'
|
||||||
/>
|
>
|
||||||
|
<Text size='sm' className='text-white/60'>
|
||||||
|
<span className='text-white'>{buyAsset.symbol}</span>/{sellAsset.symbol}
|
||||||
|
</Text>
|
||||||
|
<div className='flex items-center gap-2'>
|
||||||
|
<Text>All markets</Text>
|
||||||
|
<ChevronDown className='w-3 h-3' />
|
||||||
|
</div>
|
||||||
|
</Button>
|
||||||
<AssetOverlay
|
<AssetOverlay
|
||||||
state={assetOverlayState}
|
state={assetOverlayState}
|
||||||
onChangeState={handleChangeState}
|
onChangeState={handleChangeState}
|
||||||
@ -54,6 +57,6 @@ export default function AssetSelectorPair(props: Props) {
|
|||||||
sellAsset={sellAsset}
|
sellAsset={sellAsset}
|
||||||
onChangeTradingPair={onChangeTradingPair}
|
onChangeTradingPair={onChangeTradingPair}
|
||||||
/>
|
/>
|
||||||
</div>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user