Skip to content

Commit 66c07e1

Browse files
authored
feat: add Kernel points [skip cypress] (#2335)
1 parent 9b330f3 commit 66c07e1

File tree

13 files changed

+78
-4
lines changed

13 files changed

+78
-4
lines changed

public/icons/other/kernel.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { Trans } from '@lingui/macro';
2+
3+
import { Link } from '../primitives/Link';
4+
import { TextWithTooltip } from '../TextWithTooltip';
5+
6+
export const KernelAirdropTooltip = () => {
7+
return (
8+
<TextWithTooltip
9+
wrapperProps={{ ml: 2 }}
10+
color="warning.main"
11+
iconSize={20}
12+
icon={<image href="/icons/other/kernel.svg" width={25} height={25} />}
13+
>
14+
<>
15+
<Trans>
16+
{`This asset is eligible for Kernel points incentive program. Aave Labs does not
17+
guarantee the program and accepts no liability.\n`}
18+
</Trans>
19+
<br />
20+
<br />
21+
<Trans>{'Learn more about the Kernel points distribution'}</Trans>{' '}
22+
<Link
23+
href="https://kerneldao.gitbook.io/kernel/getting-started/editor/kernel-points-guide "
24+
sx={{ textDecoration: 'underline' }}
25+
variant="caption"
26+
color="text.secondary"
27+
>
28+
{'here'}
29+
</Link>
30+
{'.'}
31+
</>
32+
</TextWithTooltip>
33+
);
34+
};

src/locales/el/messages.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/locales/en/messages.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/locales/en/messages.po

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1282,6 +1282,10 @@ msgstr "View Bridge Transactions"
12821282
msgid "Invalid return value of the flashloan executor function"
12831283
msgstr "Invalid return value of the flashloan executor function"
12841284

1285+
#: src/components/infoTooltips/KernelAirdropTooltip.tsx
1286+
msgid "Learn more about the Kernel points distribution"
1287+
msgstr "Learn more about the Kernel points distribution"
1288+
12851289
#: src/components/isolationMode/IsolatedBadge.tsx
12861290
msgid "Asset can be only used as collateral in isolation mode with limited borrowing power. To enter isolation mode, disable all other collateral."
12871291
msgstr "Asset can be only used as collateral in isolation mode with limited borrowing power. To enter isolation mode, disable all other collateral."
@@ -3153,6 +3157,10 @@ msgstr "Maximum amount available to borrow is limited because protocol borrow ca
31533157
msgid "COPY IMAGE"
31543158
msgstr "COPY IMAGE"
31553159

3160+
#: src/components/infoTooltips/KernelAirdropTooltip.tsx
3161+
msgid "This asset is eligible for Kernel points incentive program. Aave Labs does not guarantee the program and accepts no liability."
3162+
msgstr "This asset is eligible for Kernel points incentive program. Aave Labs does not guarantee the program and accepts no liability."
3163+
31563164
#: src/components/transactions/DebtSwitch/DebtSwitchModalContent.tsx
31573165
msgid "Insufficient collateral to cover new borrow position. Wallet must have borrowing power remaining to perform debt switch."
31583166
msgstr "Insufficient collateral to cover new borrow position. Wallet must have borrowing power remaining to perform debt switch."

src/locales/es/messages.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/locales/fr/messages.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/modules/dashboard/lists/ListItemWrapper.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Tooltip, Typography } from '@mui/material';
22
import { ReactNode } from 'react';
33
import { BorrowDisabledToolTip } from 'src/components/infoTooltips/BorrowDisabledToolTip';
4+
import { KernelAirdropTooltip } from 'src/components/infoTooltips/KernelAirdropTooltip';
45
import { OffboardingTooltip } from 'src/components/infoTooltips/OffboardingToolTip';
56
import { PausedTooltip } from 'src/components/infoTooltips/PausedTooltip';
67
import { SpkAirdropTooltip } from 'src/components/infoTooltips/SpkAirdropTooltip';
@@ -54,6 +55,7 @@ export const ListItemWrapper = ({
5455
showExternalIncentivesTooltips = {
5556
superFestRewards: false,
5657
spkAirdrop: false,
58+
kernelPoints: false,
5759
},
5860
...rest
5961
}: ListItemWrapperProps) => {
@@ -93,6 +95,7 @@ export const ListItemWrapper = ({
9395
{paused && <PausedTooltip />}
9496
{showExternalIncentivesTooltips.superFestRewards && <SuperFestTooltip />}
9597
{showExternalIncentivesTooltips.spkAirdrop && <SpkAirdropTooltip />}
98+
{showExternalIncentivesTooltips.kernelPoints && <KernelAirdropTooltip />}
9699
{showFrozenTooltip && <FrozenTooltip symbol={symbol} currentMarket={currentMarket} />}
97100
{showRenFilTooltip && <RenFILToolTip />}
98101
{showAmplTooltip && <AMPLToolTip />}

src/modules/dashboard/lists/ListMobileItemWrapper.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { ReactNode } from 'react';
22
import { BorrowDisabledToolTip } from 'src/components/infoTooltips/BorrowDisabledToolTip';
3+
import { KernelAirdropTooltip } from 'src/components/infoTooltips/KernelAirdropTooltip';
34
import { OffboardingTooltip } from 'src/components/infoTooltips/OffboardingToolTip';
45
import { PausedTooltip } from 'src/components/infoTooltips/PausedTooltip';
56
import { SpkAirdropTooltip } from 'src/components/infoTooltips/SpkAirdropTooltip';
@@ -51,6 +52,7 @@ export const ListMobileItemWrapper = ({
5152
showExternalIncentivesTooltips = {
5253
superFestRewards: false,
5354
spkAirdrop: false,
55+
kernelPoints: false,
5456
},
5557
}: ListMobileItemWrapperProps) => {
5658
const WarningComponent: React.FC = () => {
@@ -66,6 +68,7 @@ export const ListMobileItemWrapper = ({
6668
{paused && <PausedTooltip />}
6769
{showExternalIncentivesTooltips.superFestRewards && <SuperFestTooltip />}
6870
{showExternalIncentivesTooltips.spkAirdrop && <SpkAirdropTooltip />}
71+
{showExternalIncentivesTooltips.kernelPoints && <KernelAirdropTooltip />}
6972
{showFrozenTooltip && <FrozenTooltip symbol={symbol} currentMarket={currentMarket} />}
7073
{showRenFilTooltip && <RenFILToolTip />}
7174
{showAmplTooltip && <AMPLToolTip />}

src/modules/dashboard/lists/SupplyAssetsList/SupplyAssetsListMobileItem.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Box, Button } from '@mui/material';
44
import { useAssetCaps } from 'src/hooks/useAssetCaps';
55
import { useRootStore } from 'src/store/root';
66
import { DashboardReserve } from 'src/utils/dashboardSortUtils';
7+
import { showExternalIncentivesTooltip } from 'src/utils/utils';
78

89
import { CapsHint } from '../../../../components/caps/CapsHint';
910
import { CapType } from '../../../../components/caps/helper';
@@ -52,6 +53,11 @@ export const SupplyAssetsListMobileItem = ({
5253
underlyingAsset={underlyingAsset}
5354
currentMarket={currentMarket}
5455
showDebtCeilingTooltips
56+
showExternalIncentivesTooltips={showExternalIncentivesTooltip(
57+
symbol,
58+
currentMarket,
59+
ProtocolAction.supply
60+
)}
5561
>
5662
<ListValueRow
5763
title={<Trans>Supply balance</Trans>}

0 commit comments

Comments
 (0)