fix tooltip text and slider max

This commit is contained in:
saml33 2023-11-09 11:52:12 +11:00
parent 1cb7d8a2a1
commit ca51d24d76
3 changed files with 4 additions and 4 deletions

View File

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

View File

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

View File

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