maxCollateral && handleMaxAction(ActionCodes.ADD_COLLATERAL)}
disabled={
- !selectedSeries || collatInput === maxCollateral || selectedSeries.seriesIsMature
+ ((!selectedSeries || selectedSeries.seriesIsMature) && !selectedVR) ||
+ collatInput === maxCollateral
}
clearAction={() => setCollatInput('')}
showingMax={!!collatInput && collatInput === maxCollateral}
@@ -507,15 +545,28 @@ const Borrow = () => {
icon={}
value={`${cleanValue(borrowInput, selectedBase?.digitFormat!)} ${selectedBase?.displaySymbol}`}
/>
- } value={`${selectedSeries?.displayName}`} />
+ {selectedSeries && (
+
+ }
+ value={`${selectedSeries.displayName}`}
+ />
+
+ }
+ value={`${cleanValue(borrowEstimate_, selectedBase?.digitFormat!)} ${
+ selectedBase?.displaySymbol
+ }`}
+ />
+
+ )}
}
- value={`${cleanValue(borrowEstimate_, selectedBase?.digitFormat!)} ${
- selectedBase?.displaySymbol
- }`}
+ label={`${selectedVR ? 'Variable' : 'Effective'} APR`}
+ icon={}
+ value={`${apr}%`}
/>
- } value={`${apr}%`} />
{
borrowProcess?.stage === ProcessStage.PROCESS_COMPLETE &&
borrowProcess?.tx.status === TxState.SUCCESSFUL && (
- View Vault:
- {vaultToUse && !vaultsLoading && (
-
- )}
+ View Vault:
+ {vaultToUse && }
{!vaultToUse && newVaultId && (
-
+
)}
)}
@@ -587,7 +636,7 @@ const Borrow = () => {
// label={ Next step }
label={
- {borrowInput && (!selectedSeries || selectedBase?.proxyId !== selectedSeries.baseId)
+ {borrowInput && (!selectedSeries || selectedBase?.proxyId !== selectedSeries.baseId) && !selectedVR
? `Select a${selectedBase?.id === WETH ? 'n' : ''} ${selectedBase?.displaySymbol}${
selectedBase && '-based'
} Maturity`
diff --git a/src/components/views/Dashboard.tsx b/src/components/views/Dashboard.tsx
index b507c4e90..eb1a964ef 100644
--- a/src/components/views/Dashboard.tsx
+++ b/src/components/views/Dashboard.tsx
@@ -16,6 +16,7 @@ import { UserContext } from '../../contexts/UserContext';
import { formatValue } from '../../utils/appUtils';
import { Settings } from '../../contexts/types/settings';
import useAccountPlus from '../../hooks/useAccountPlus';
+import useVYTokens from '../../hooks/entities/useVYTokens';
const StyledBox = styled(Box)`
* {
@@ -45,6 +46,8 @@ const Dashboard = () => {
const { address: account } = useAccountPlus();
+ const { isLoading: VyTokensLoading } = useVYTokens();
+
const {
vaultPositions,
lendPositions,
@@ -119,7 +122,7 @@ const Dashboard = () => {