fix token positions slots error display
This commit is contained in:
parent
a5c06e4e3c
commit
a8363d944f
|
@ -21,19 +21,16 @@ export default function useTokenPositionsFull(banks: Array<Bank | undefined>) {
|
|||
}
|
||||
}
|
||||
const availableTokenPositions = totalTokens.length - usedTokens.length
|
||||
|
||||
if (
|
||||
banks.length === 2 &&
|
||||
(alreadyHasPositionCount === 2 || availableTokenPositions >= 2)
|
||||
alreadyHasPositionCount === banks.length ||
|
||||
availableTokenPositions >= banks.length ||
|
||||
(banks.length === 2 &&
|
||||
alreadyHasPositionCount &&
|
||||
alreadyHasPositionCount === availableTokenPositions)
|
||||
) {
|
||||
return false
|
||||
}
|
||||
if (
|
||||
banks.length === 1 &&
|
||||
(alreadyHasPositionCount === 1 || availableTokenPositions >= 1)
|
||||
) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
} else return true
|
||||
}, [banks, usedTokens, totalTokens])
|
||||
|
||||
return tokenPositionsFull
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
"equity": "Equity",
|
||||
"error-borrow-exceeds-limit": "Maximum borrow for the current period is {{remaining}}. New period starts {{resetTime}}",
|
||||
"error-repay-insufficient-funds": "Not enough {{token}} in your wallet to repay this amount",
|
||||
"error-token-positions-full": "Not enough token positions available in your account",
|
||||
"error-token-positions-full": "You've used all of your token account slots. Close unused slots to add this token to your account.",
|
||||
"explore": "Explore",
|
||||
"explorer": "Explorer",
|
||||
"fee": "Fee",
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
"equity": "Equity",
|
||||
"error-borrow-exceeds-limit": "Maximum borrow for the current period is {{remaining}}. New period starts {{resetTime}}",
|
||||
"error-repay-insufficient-funds": "Not enough {{token}} in your wallet to repay this amount",
|
||||
"error-token-positions-full": "Not enough token positions available in your account",
|
||||
"error-token-positions-full": "You've used all of your token account slots. Close unused slots to add this token to your account.",
|
||||
"explore": "Explore",
|
||||
"explorer": "Explorer",
|
||||
"fee": "Fee",
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
"equity": "Equity",
|
||||
"error-borrow-exceeds-limit": "Maximum borrow for the current period is {{remaining}}. New period starts {{resetTime}}",
|
||||
"error-repay-insufficient-funds": "Not enough {{token}} in your wallet to repay this amount",
|
||||
"error-token-positions-full": "Not enough token positions available in your account",
|
||||
"error-token-positions-full": "You've used all of your token account slots. Close unused slots to add this token to your account.",
|
||||
"explore": "Explore",
|
||||
"explorer": "Explorer",
|
||||
"fee": "Fee",
|
||||
|
|
Loading…
Reference in New Issue