Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃毟 AssetHeader: get maxUtilization from Previewer #1362

Merged
2 commits merged into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions components/asset/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ const AssetHeaderInfo: FC<Props> = ({ symbol }) => {
[push, query, symbol],
);

const borrowableUtilization = useMemo(() => {
if (!marketAccount) return;
return Number(WEI_PER_ETHER - marketAccount.reserveFactor) / 1e18;
}, [marketAccount]);

return (
<>
<Grid
Expand Down Expand Up @@ -194,11 +199,14 @@ const AssetHeaderInfo: FC<Props> = ({ symbol }) => {
))}
</Grid>
</Grid>
{totalUtilization && totalUtilization > 0.9 && (
{totalUtilization && borrowableUtilization && totalUtilization > borrowableUtilization && (
<Alert sx={{ width: '100%' }} severity="info">
<Typography variant="body2">
{t(
"The Global Utilization is above 90%, and the remaining liquidity is established as a Liquidity Reserve that can't be borrowed and is only available for withdrawals.",
"The Global Utilization is above {{borrowableUtilization}}, and the remaining liquidity is established as a Liquidity Reserve that can't be borrowed and is only available for withdrawals.",
{
borrowableUtilization: toPercentage(borrowableUtilization, 0),
},
)}
</Typography>
<Typography variant="body2">
Expand Down
17 changes: 6 additions & 11 deletions i18n/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,8 @@
"3M": "3M",
"Historical Variable Rates": "Tasas Variables Hist贸ricas",
"Show utilization": "Ver utilizaci贸n",
"Compare with other yield curves": "Comparar con otras curvas de rendimiento",
"Loading data...": "Cargando...",
"ZOOM IN": "AMPLIAR",
"ZOOM OUT": "REDUCIR",
"Utilization Rate (Variable Rate Pool)": "Tasa de Utilizaci贸n (Pool de Tasa Variable)",
"Utilization Rates (Fixed Rate Pools)": "Tasas de Utilizaci贸n (Pools de Tasa Fija)",
"Utilization": "Utilizaci贸n",
"DEPOSIT APR": "TNA DEP脫SITO",
"BORROW APR": "TNA PR脡STAMO",
"Current Yield Curves": "Curvas de Rendimiento Actuales",
"Current Utilization": "Utilizaci贸n Actual",
"Late repayment will result in a penalty daily rate of {{penaltyRate}}": "El retraso en el pago resultar谩 en una tasa de penalizaci贸n diaria de {{penaltyRate}}",
"Completed": "Completado",
"{{daysLeft}} left": "{{daysLeft}} restantes",
Expand Down Expand Up @@ -621,6 +612,10 @@
"The upgrade to the new Interest Rate Model (EXAIP-08) is scheduled for execution today at 8:30 PM UTC": "La actualizaci贸n al nuevo Modelo de Tasa de Inter茅s (EXAIP-08) est谩 programada para ejecutarse hoy a las 8:30 PM UTC",
"Available for Withdrawal": "Disponible para Retiro",
"Global Utilization": "Utilizaci贸n Global",
"The Global Utilization is above 90%, and the remaining liquidity is established as a Liquidity Reserve that can't be borrowed and is only available for withdrawals.": "La Utilizaci贸n Global est谩 por encima del 90%, y la liquidez restante se establece como una Reserva de Liquidez que no se puede pedir prestada y solo est谩 disponible para retiros.",
"Total esEXA Vesting": "esEXA Total en Vesting"
"Total esEXA Vesting": "esEXA Total en Vesting",
"The Global Utilization is above {{borrowableUtilization}}, and the remaining liquidity is established as a Liquidity Reserve that can't be borrowed and is only available for withdrawals.": "La Utilizaci贸n Global est谩 por encima del {{borrowableUtilization}}, y la liquidez restante se establece como una Reserva de Liquidez que no se puede pedir prestada y solo est谩 disponible para retiros.",
"Term Structure of Interest Rates": "Estructura de Plazos de Tasas de Inter茅s",
"Rate": "Tasa",
"Min": "M铆n",
"Variable APR, Utilization and Global Utilization": "TNA Variable, Utilizaci贸n y Utilizaci贸n Global"
}
Loading