Skip to content

Commit

Permalink
feat: add Kernel incentive indicator in Reserve overview supply page
Browse files Browse the repository at this point in the history
  • Loading branch information
NandyBa committed Feb 14, 2025
1 parent 3dd6dc3 commit 045edca
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/modules/reserve-overview/SupplyInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { ProtocolAction } from '@aave/contract-helpers';
import { valueToBigNumber } from '@aave/math-utils';
import { Trans } from '@lingui/macro';
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 { IncentivesButton } from 'src/components/incentives/IncentivesButton';
import { KernelAirdropTooltip } from 'src/components/infoTooltips/KernelAirdropTooltip';
import { LiquidationPenaltyTooltip } from 'src/components/infoTooltips/LiquidationPenaltyTooltip';
import { LiquidationThresholdTooltip } from 'src/components/infoTooltips/LiquidationThresholdTooltip';
import { MaxLTVTooltip } from 'src/components/infoTooltips/MaxLTVTooltip';
Expand All @@ -18,6 +20,7 @@ import { ComputedReserveData } from 'src/hooks/app-data-provider/useAppDataProvi
import { AssetCapHookData } from 'src/hooks/useAssetCaps';
import { MarketDataType } from 'src/utils/marketsAndNetworksConfig';
import { GENERAL } from 'src/utils/mixPanelEvents';
import { showExternalIncentivesTooltip } from 'src/utils/utils';

import { ApyGraphContainer } from './graphs/ApyGraphContainer';
import { PanelItem } from './ReservePanels';
Expand All @@ -39,6 +42,11 @@ export const SupplyInfo = ({
supplyCap,
debtCeiling,
}: SupplyInfoProps) => {
const showExternalIncentivesTooltips = showExternalIncentivesTooltip(
reserve.symbol,
currentMarketData.market,
ProtocolAction.supply
);
return (
<Box sx={{ flexGrow: 1, minWidth: 0, maxWidth: '100%', width: '100%' }}>
<Box
Expand Down Expand Up @@ -148,7 +156,10 @@ export const SupplyInfo = ({
</PanelItem>
)}
<PanelItem title={<Trans>APY</Trans>}>
<FormattedNumber value={reserve.supplyAPY} percent variant="main16" />
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<FormattedNumber value={reserve.supplyAPY} percent variant="main16" />
{showExternalIncentivesTooltips.kernelPoints && <KernelAirdropTooltip />}
</div>
<IncentivesButton
symbol={reserve.symbol}
incentives={reserve.aIncentivesData}
Expand Down

0 comments on commit 045edca

Please sign in to comment.