fix tooltip text and slider max
This commit is contained in:
parent
1cb7d8a2a1
commit
ca51d24d76
|
@ -238,7 +238,7 @@ function StakeForm({ token: selectedToken }: StakeFormProps) {
|
||||||
onClick={setMax}
|
onClick={setMax}
|
||||||
value={tokenMax.maxAmount}
|
value={tokenMax.maxAmount}
|
||||||
/>
|
/>
|
||||||
<Tooltip content={t('account:refresh-balance')}>
|
<Tooltip content="Refresh Balance">
|
||||||
<IconButton
|
<IconButton
|
||||||
className={refreshingWalletTokens ? 'animate-spin' : ''}
|
className={refreshingWalletTokens ? 'animate-spin' : ''}
|
||||||
onClick={handleRefreshWalletBalances}
|
onClick={handleRefreshWalletBalances}
|
||||||
|
|
|
@ -241,7 +241,7 @@ function UnstakeForm({ token: selectedToken }: UnstakeFormProps) {
|
||||||
onClick={setMax}
|
onClick={setMax}
|
||||||
value={tokenMax.maxAmount}
|
value={tokenMax.maxAmount}
|
||||||
/>
|
/>
|
||||||
<Tooltip content={t('account:refresh-balance')}>
|
<Tooltip content="Refresh Balance">
|
||||||
<IconButton
|
<IconButton
|
||||||
className={refreshingWalletTokens ? 'animate-spin' : ''}
|
className={refreshingWalletTokens ? 'animate-spin' : ''}
|
||||||
onClick={handleRefreshWalletBalances}
|
onClick={handleRefreshWalletBalances}
|
||||||
|
|
|
@ -31,8 +31,8 @@ export default function useLeverageMax(selectedToken: string) {
|
||||||
1 -
|
1 -
|
||||||
conversionRate *
|
conversionRate *
|
||||||
floorToDecimal(stakeInitAssetWeight.toNumber(), 2).toNumber()
|
floorToDecimal(stakeInitAssetWeight.toNumber(), 2).toNumber()
|
||||||
|
const max = floorToDecimal(1 + x.toNumber() / y, 2).toNumber()
|
||||||
return 1 + x.toNumber() / y
|
return max
|
||||||
}, [stakeBank, borrowBank])
|
}, [stakeBank, borrowBank])
|
||||||
|
|
||||||
return leverageMax
|
return leverageMax
|
||||||
|
|
Loading…
Reference in New Issue