{!loading && (
- {poolReserve.symbol}
+ {poolReserve.underlyingToken.symbol}
)}
@@ -183,7 +189,7 @@ export const ReserveTopDetailsWrapper = ({ underlyingAsset }: ReserveTopDetailsP
{!downToSM && (
<>
{poolReserve.symbol}}
+ title={!loading && {poolReserve.underlyingToken.symbol}}
withoutIconWrapper
icon={}
loading={loading}
diff --git a/src/modules/reserve-overview/SupplyInfo.tsx b/src/modules/reserve-overview/SupplyInfo.tsx
index 47c682eb4a..e17dfaac04 100644
--- a/src/modules/reserve-overview/SupplyInfo.tsx
+++ b/src/modules/reserve-overview/SupplyInfo.tsx
@@ -5,6 +5,7 @@ import CheckRoundedIcon from '@mui/icons-material/CheckRounded';
import { AlertTitle, Box, Typography } from '@mui/material';
import { CapsCircularStatus } from 'src/components/caps/CapsCircularStatus';
import { DebtCeilingStatus } from 'src/components/caps/DebtCeilingStatus';
+import { mapAaveProtocolIncentives } from 'src/components/incentives/incentives.helper';
import { IncentivesCard } from 'src/components/incentives/IncentivesCard';
import { LiquidationPenaltyTooltip } from 'src/components/infoTooltips/LiquidationPenaltyTooltip';
import { LiquidationThresholdTooltip } from 'src/components/infoTooltips/LiquidationThresholdTooltip';
@@ -15,8 +16,8 @@ import { Warning } from 'src/components/primitives/Warning';
import { ReserveOverviewBox } from 'src/components/ReserveOverviewBox';
import { ReserveSubheader } from 'src/components/ReserveSubheader';
import { TextWithTooltip } from 'src/components/TextWithTooltip';
-import { ComputedReserveData } from 'src/hooks/app-data-provider/useAppDataProvider';
-import { AssetCapHookData } from 'src/hooks/useAssetCaps';
+import { ReserveWithId } from 'src/hooks/app-data-provider/useAppDataProvider';
+import { AssetCapHookData } from 'src/hooks/useAssetCapsSDK';
import { GENERAL } from 'src/utils/events';
import { MarketDataType } from 'src/utils/marketsAndNetworksConfig';
@@ -24,7 +25,7 @@ import { SupplyApyGraph } from './graphs/ApyGraphContainer';
import { PanelItem } from './ReservePanels';
interface SupplyInfoProps {
- reserve: ComputedReserveData;
+ reserve: ReserveWithId;
currentMarketData: MarketDataType;
renderCharts: boolean;
showSupplyCapStatus: boolean;
@@ -40,6 +41,7 @@ export const SupplyInfo = ({
supplyCap,
debtCeiling,
}: SupplyInfoProps) => {
+ const supplyProtocolIncentives = mapAaveProtocolIncentives(reserve.incentives, 'supply');
return (
{' '}
- {reserve.symbol} (
+ {reserve.underlyingToken.symbol} (
@@ -110,7 +112,7 @@ export const SupplyInfo = ({
}
>
-
+
of
-
+
-
+
of
-
+
>
@@ -144,38 +149,41 @@ export const SupplyInfo = ({
}
>
-
-
+
+
)}
APY}>
- {reserve.unbacked && reserve.unbacked !== '0' && (
+ {/* //! Doesnt exist in sdk */}
+ {/* {reserve.unbacked && reserve.unbacked !== '0' && (
Unbacked}>
- )}
+ )} */}
- {renderCharts && (reserve.borrowingEnabled || Number(reserve.totalDebt) > 0) && (
-
- )}
+ {renderCharts &&
+ (reserve.borrowInfo?.borrowingState === 'ENABLED' ||
+ Number(reserve.borrowInfo?.total.amount.value) > 0) && (
+
+ )}
- {reserve.isIsolated ? (
+ {reserve.isolationModeConfig?.canBeCollateral ? (
Collateral usage
@@ -194,7 +202,7 @@ export const SupplyInfo = ({
- ) : reserve.reserveLiquidationThreshold !== '0' ? (
+ ) : reserve.supplyInfo.liquidationThreshold.value !== '0' ? (
)}
- {reserve.reserveLiquidationThreshold !== '0' && (
+ {reserve.supplyInfo.liquidationThreshold.value !== '0' && (
- {reserve.isIsolated && (
+ {reserve.isolationModeConfig?.canBeCollateral && (
)}
)}
- {reserve.symbol == 'stETH' && (
+ {reserve.underlyingToken.symbol == 'stETH' && (
diff --git a/src/modules/reserve-overview/TokenLinkDropdown.tsx b/src/modules/reserve-overview/TokenLinkDropdown.tsx
index 5e7a98c9f2..3ce224b543 100644
--- a/src/modules/reserve-overview/TokenLinkDropdown.tsx
+++ b/src/modules/reserve-overview/TokenLinkDropdown.tsx
@@ -5,14 +5,14 @@ import * as React from 'react';
import { useState } from 'react';
import { CircleIcon } from 'src/components/CircleIcon';
import { TokenIcon } from 'src/components/primitives/TokenIcon';
-import { ComputedReserveData } from 'src/hooks/app-data-provider/useAppDataProvider';
+import { ReserveWithId } from 'src/hooks/app-data-provider/useAppDataProvider';
import { useRootStore } from 'src/store/root';
import { useShallow } from 'zustand/shallow';
import { RESERVE_DETAILS } from '../../utils/events';
interface TokenLinkDropdownProps {
- poolReserve: ComputedReserveData;
+ poolReserve: ReserveWithId;
downToSM: boolean;
hideAToken?: boolean;
hideVariableDebtToken?: boolean;
@@ -33,11 +33,11 @@ export const TokenLinkDropdown = ({
const handleClick = (event: React.MouseEvent) => {
trackEvent(RESERVE_DETAILS.RESERVE_TOKENS_DROPDOWN, {
- assetName: poolReserve.name,
- asset: poolReserve.underlyingAsset,
- aToken: poolReserve.aTokenAddress,
+ assetName: poolReserve.underlyingToken.name,
+ asset: poolReserve.underlyingToken.address,
+ aToken: poolReserve.aToken.address,
market: currentMarket,
- variableDebtToken: poolReserve.variableDebtTokenAddress,
+ variableDebtToken: poolReserve.vToken.address,
});
setAnchorEl(event.currentTarget);
};
@@ -51,8 +51,9 @@ export const TokenLinkDropdown = ({
const showVariableDebtToken =
!hideVariableDebtToken &&
- (poolReserve.borrowingEnabled || Number(poolReserve.totalVariableDebt) > 0);
- console.log('poolReserve', poolReserve.totalVariableDebt);
+ (poolReserve.borrowInfo?.borrowingState === 'ENABLED' ||
+ Number(poolReserve.borrowInfo?.total.amount.value) > 0);
+
return (
<>
@@ -92,23 +93,23 @@ export const TokenLinkDropdown = ({
onClick={() => {
trackEvent(RESERVE_DETAILS.RESERVE_TOKEN_ACTIONS, {
type: 'Underlying Token',
- assetName: poolReserve.name,
- asset: poolReserve.underlyingAsset,
- aToken: poolReserve.aTokenAddress,
+ assetName: poolReserve.underlyingToken.name,
+ asset: poolReserve.underlyingToken.address,
+ aToken: poolReserve.aToken.address,
market: currentMarket,
- variableDebtToken: poolReserve.variableDebtTokenAddress,
+ variableDebtToken: poolReserve.vToken.address,
});
}}
component="a"
href={currentNetworkConfig.explorerLinkBuilder({
- address: poolReserve?.underlyingAsset,
+ address: poolReserve?.underlyingToken.address.toLowerCase(),
})}
target="_blank"
divider={showVariableDebtToken}
>
-
+
- {poolReserve.symbol}
+ {poolReserve.underlyingToken.symbol}
@@ -125,22 +126,26 @@ export const TokenLinkDropdown = ({
onClick={() => {
trackEvent(RESERVE_DETAILS.RESERVE_TOKEN_ACTIONS, {
type: 'aToken',
- assetName: poolReserve.name,
- asset: poolReserve.underlyingAsset,
- aToken: poolReserve.aTokenAddress,
+ assetName: poolReserve.underlyingToken.name,
+ asset: poolReserve.underlyingToken.address,
+ aToken: poolReserve.aToken.address,
market: currentMarket,
- variableDebtToken: poolReserve.variableDebtTokenAddress,
+ variableDebtToken: poolReserve.vToken.address,
});
}}
href={currentNetworkConfig.explorerLinkBuilder({
- address: poolReserve?.aTokenAddress,
+ address: poolReserve?.aToken.address.toLocaleLowerCase(),
})}
target="_blank"
divider={showVariableDebtToken}
>
-
+
- {'a' + poolReserve.symbol}
+ {poolReserve.aToken.symbol}
@@ -157,23 +162,27 @@ export const TokenLinkDropdown = ({
)}
diff --git a/src/modules/reserve-overview/graphs/InterestRateModelGraphContainer.tsx b/src/modules/reserve-overview/graphs/InterestRateModelGraphContainer.tsx
index ba5d9b8247..b59de97729 100644
--- a/src/modules/reserve-overview/graphs/InterestRateModelGraphContainer.tsx
+++ b/src/modules/reserve-overview/graphs/InterestRateModelGraphContainer.tsx
@@ -1,12 +1,12 @@
import { Box } from '@mui/material';
import { ParentSize } from '@visx/responsive';
-import type { ComputedReserveData } from 'src/hooks/app-data-provider/useAppDataProvider';
+import type { ReserveWithId } from 'src/hooks/app-data-provider/useAppDataProvider';
import { GraphLegend } from './GraphLegend';
import { InterestRateModelGraph } from './InterestRateModelGraph';
type InteresetRateModelGraphContainerProps = {
- reserve: ComputedReserveData;
+ reserve: ReserveWithId;
};
export type Field = 'variableBorrowRate' | 'utilizationRate';
@@ -41,13 +41,13 @@ export const InterestRateModelGraphContainer = ({
height={CHART_HEIGHT}
fields={fields}
reserve={{
- baseVariableBorrowRate: reserve.baseVariableBorrowRate,
- optimalUsageRatio: reserve.optimalUsageRatio,
- utilizationRate: reserve.borrowUsageRatio,
- variableRateSlope1: reserve.variableRateSlope1,
- variableRateSlope2: reserve.variableRateSlope2,
- totalLiquidityUSD: reserve.totalLiquidityUSD,
- totalDebtUSD: reserve.totalDebtUSD,
+ baseVariableBorrowRate: String(reserve.borrowInfo?.reserveFactor.raw),
+ optimalUsageRatio: String(reserve.borrowInfo?.optimalUsageRate.raw),
+ utilizationRate: String(reserve.borrowInfo?.utilizationRate.value),
+ variableRateSlope1: String(reserve.borrowInfo?.variableRateSlope1.raw),
+ variableRateSlope2: String(reserve.borrowInfo?.variableRateSlope2.raw),
+ totalLiquidityUSD: reserve.size.usd,
+ totalDebtUSD: String(reserve.borrowInfo?.total.usd),
}}
/>
)}
diff --git a/src/modules/sGho/SGhoHeader.tsx b/src/modules/sGho/SGhoHeader.tsx
index b4bb7880e8..bc01b85230 100644
--- a/src/modules/sGho/SGhoHeader.tsx
+++ b/src/modules/sGho/SGhoHeader.tsx
@@ -100,7 +100,7 @@ const SGhoHeaderUserDetails = ({
stkGho: StakeTokenFormatted;
}) => {
const { data: stakeAPR, isLoading: isLoadingStakeAPR } = useStakeTokenAPR();
- const { reserves } = useAppDataContext();
+ const { supplyReserves } = useAppDataContext();
const {
addERC20Token,
@@ -108,7 +108,7 @@ const SGhoHeaderUserDetails = ({
chainId: connectedChainId,
currentAccount,
} = useWeb3Context();
- const poolReserve = reserves.find((reserve) => reserve.symbol === 'GHO');
+ const poolReserve = supplyReserves.find((reserve) => reserve.underlyingToken.symbol === 'GHO');
const theme = useTheme();
const [currentChainId] = useRootStore(useShallow((state) => [state.currentChainId]));
From be28f80555cd9de96aa1edda0a723149237b8a2d Mon Sep 17 00:00:00 2001
From: Alejandro <95312462+AGMASO@users.noreply.github.com>
Date: Fri, 3 Oct 2025 17:55:35 +0200
Subject: [PATCH 09/36] fix: show disabled only for > 0 amounts
---
src/modules/markets/MarketAssetsListItem.tsx | 8 ++++----
src/modules/markets/MarketAssetsListMobileItem.tsx | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/modules/markets/MarketAssetsListItem.tsx b/src/modules/markets/MarketAssetsListItem.tsx
index 9ec1592d15..784f421c67 100644
--- a/src/modules/markets/MarketAssetsListItem.tsx
+++ b/src/modules/markets/MarketAssetsListItem.tsx
@@ -130,7 +130,7 @@ export const MarketAssetsListItem = ({ ...reserve }: ReserveWithId) => {