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