Skip to content

✨ Refactor and Improve all incentives #2308

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 62 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
b20946d
fix: implement incentives for supply/borrow infos
MartinGbz Jan 7, 2025
48158e4
feat: add all incentives in the whole app
MartinGbz Jan 7, 2025
5c41e27
fix: displayBlack issue on infos
MartinGbz Jan 7, 2025
00d439b
fix: issue on supply/borrow modal
MartinGbz Jan 7, 2025
054cfe1
fix: display issue
MartinGbz Jan 7, 2025
822fe8c
fix: debt switch
MartinGbz Jan 7, 2025
296de8d
fix: issue lmIncentivesCheck
MartinGbz Jan 8, 2025
4251320
fix: aprs check inside the IncentivesButton component
MartinGbz Jan 8, 2025
25a1cf0
fix: variableDebtTokenAddress undefined
MartinGbz Jan 8, 2025
f23fe84
fix: issue debtSwitch rewards apr
MartinGbz Jan 8, 2025
40293d5
fix: issue supply/borrow modal ignit program
MartinGbz Jan 8, 2025
dac9094
refactor: hasIncentivesCheck
MartinGbz Jan 8, 2025
f400537
fix: set norAprExternalIncentivesTooltips with reward aprs, and remov…
MartinGbz Jan 8, 2025
f531844
Merge branch 'main' into fix/implement-incentives-to-remaining-compon…
MartinGbz Feb 10, 2025
030b2a4
feat: improve multiple apy UX
MartinGbz Feb 14, 2025
97893a3
fix: detail incentives line component
MartinGbz Feb 17, 2025
c2210f6
fix: rewards mesages
MartinGbz Feb 17, 2025
62a04c4
fix: incentives card style
MartinGbz Feb 17, 2025
1e12934
fix: issue on zksync ignite incentives
MartinGbz Feb 18, 2025
a02d9aa
fix: detail incentives
MartinGbz Feb 18, 2025
943311e
chore: refactor code locations + names
MartinGbz Feb 18, 2025
34e3a08
Merge branch 'main' into fix/implement-incentives-to-remaining-compon…
MartinGbz Mar 5, 2025
5e3af0d
fix: ethena and sonic tooltips
MartinGbz Mar 5, 2025
100452b
fix: external no number tooltips
MartinGbz Mar 5, 2025
139e86c
fix: gho borrow incentives implementation
MartinGbz Mar 5, 2025
eaabecb
chore: rename IncentivesCard to RateAndIncentivesBox
MartinGbz Mar 5, 2025
d72c794
chore: rename IncentivesBox to IncentivesCard
MartinGbz Mar 5, 2025
5a7b071
chore: move getSimpleExternalIncentivesTooltipConfig
MartinGbz Mar 5, 2025
6eb695e
chore: refactor simple external incentive
MartinGbz Mar 5, 2025
1041260
feat: implement new PointsIncentives component/hook
MartinGbz Mar 5, 2025
a778160
fix: separate simple external incentives from the other incenives (to…
MartinGbz Mar 6, 2025
7b30dac
Merge branch 'main' into fix/implement-incentives-to-remaining-compon…
MartinGbz Mar 6, 2025
154afb4
fix: remmove old usage
MartinGbz Mar 6, 2025
235d0e1
feat: display separately simple external incentives
MartinGbz Mar 6, 2025
d11088b
chore: refactor code
MartinGbz Mar 6, 2025
ca760d4
fix: also seperate points incentives from the aprs incentives
MartinGbz Mar 6, 2025
32b75d7
fix: display condition issue
MartinGbz Mar 6, 2025
446632b
fix: kernel icon margin
MartinGbz Mar 6, 2025
fb6f910
fix: forum post link on sonic usdc merit
MartinGbz Mar 6, 2025
20e6973
chore: remove comments
MartinGbz Mar 6, 2025
b1de80d
chore: remove ethena and sonic outdated buttons
MartinGbz Mar 6, 2025
704c565
fix: left margin issue on supply/borrow infos
MartinGbz Mar 6, 2025
7ea56b7
chore: remove logs
MartinGbz Mar 6, 2025
92d5cd5
Merge branch 'main' into fix/implement-incentives-to-remaining-compon…
MartinGbz Mar 6, 2025
b96fb73
fix: etherfi points
MartinGbz Mar 6, 2025
3972da6
chore: refactor/centralized incentives files/components
MartinGbz Mar 6, 2025
606ec33
fix: gho incentives
MartinGbz Mar 7, 2025
3f60354
chore: use aave address book for sonic addresses
MartinGbz Mar 7, 2025
b637130
Merge branch 'main' into fix/implement-incentives-to-remaining-compon…
MartinGbz May 19, 2025
38d47dc
fix: update points configs
MartinGbz May 19, 2025
2c12f6f
Merge branch 'main' into fix/implement-incentives-to-remaining-compon…
MartinGbz May 26, 2025
e8506b5
fix: remove packageManager
MartinGbz Jun 11, 2025
de5c50b
fix: update yarn lock
MartinGbz Jun 11, 2025
1dd5c36
fix: remove "liquidity mining" from sentence
MartinGbz Jun 11, 2025
8d9b366
fix: refactor points incentives inside 1 component
MartinGbz Jun 11, 2025
cb492c3
fix: allIncentivesCount + align left bundled aprs
MartinGbz Jun 11, 2025
326eb16
fix: set back singleIncentives variable to >=1
MartinGbz Jun 11, 2025
16c6e43
feat: display single apr incentives in a row
MartinGbz Jun 11, 2025
d97c9ec
fix: refactor simple external incentives in 1 component
MartinGbz Jun 11, 2025
d8a186e
fix: create an incentive component for each point campaign
MartinGbz Jun 11, 2025
fdd3acf
fix: change wordings
MartinGbz Jun 11, 2025
d896d67
Merge branch 'main' into fix/implement-incentives-to-remaining-compon…
MartinGbz Jun 11, 2025
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
File renamed without changes
28 changes: 1 addition & 27 deletions public/icons/tokens/sgho.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 1 addition & 7 deletions public/icons/tokens/stkgho.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 1 addition & 27 deletions public/sgho-banner.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 0 additions & 29 deletions src/components/incentives/EthenaIncentivesTooltipContent.tsx

This file was deleted.

30 changes: 0 additions & 30 deletions src/components/incentives/EtherfiIncentivesTooltipContent.tsx

This file was deleted.

14 changes: 12 additions & 2 deletions src/components/incentives/GhoIncentivesCard.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import { ProtocolAction } from '@aave/contract-helpers';
import { AaveV3Ethereum } from '@bgd-labs/aave-address-book';
import { Trans } from '@lingui/macro';
import { Box, Tooltip, Typography, TypographyProps } from '@mui/material';
import { useAppDataContext } from 'src/hooks/app-data-provider/useAppDataProvider';
import { CustomMarket } from 'src/ui-config/marketsConfig';

import { PopperComponent } from '../ContentWithTooltip';
import GhoBorrowApyRange from '../GhoBorrowApyRange';
import { FormattedNumber } from '../primitives/FormattedNumber';
import { Link } from '../primitives/Link';
import { NoData } from '../primitives/NoData';
import { TokenIcon } from '../primitives/TokenIcon';
import { EthenaIncentivesButton } from './IncentivesButton';
import { IncentivesCard } from './RateAndIncentivesBox';

export interface GhoIncentivesCardProps {
value: string | number;
Expand Down Expand Up @@ -107,6 +109,7 @@ export const GhoIncentivesCard = ({
<Box
sx={() => ({
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
})}
>
Expand All @@ -128,12 +131,19 @@ export const GhoIncentivesCard = ({
data-cy={'apy'}
/>
)}
<IncentivesCard
symbol={'GHO'}
incentives={[]}
address={AaveV3Ethereum.ASSETS.GHO.V_TOKEN}
market={CustomMarket.proto_mainnet_v3}
protocolAction={ProtocolAction.borrow}
displayBlank={false}
/>
</Box>
</Tooltip>
) : (
<NoData variant="secondary14" color="text.secondary" />
)}
<EthenaIncentivesButton rewardedAsset={AaveV3Ethereum.ASSETS.GHO.V_TOKEN} />
</Box>
);
};
Loading