fix negative deposit cap, make trade pair selected button (#695)

This commit is contained in:
Bob van der Helm 2023-12-14 14:10:55 +01:00 committed by GitHub
parent dfce8d6a12
commit 532316e955
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 11 deletions

View File

@ -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,

View File

@ -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> </>
) )
} }