-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/sonic rewards [skip cypress] (#2381)
Co-authored-by: Martin Grabina <[email protected]>
- Loading branch information
Showing
11 changed files
with
91 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/components/incentives/SonicIncentivesTooltipContent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Trans } from '@lingui/macro'; | ||
import { Box } from '@mui/material'; | ||
|
||
import { Link } from '../primitives/Link'; | ||
|
||
export const SonicAirdropTooltipContent = ({ points }: { points: number }) => { | ||
return ( | ||
<Box> | ||
<Trans>{`This asset is eligible for ${(<b>{points}x</b>)} Sonic Rewards.\n`}</Trans> | ||
<br /> | ||
<Trans>{'Learn more about Sonic Rewards program'}</Trans>{' '} | ||
<Link | ||
href="https://blog.soniclabs.com/sonic-points-simplified-how-to-qualify-for-200-million-s-airdrop/" | ||
sx={{ textDecoration: 'underline' }} | ||
variant="caption" | ||
color="text.secondary" | ||
> | ||
{'here'} | ||
</Link> | ||
{'.'} | ||
<br /> | ||
<br /> | ||
<Trans> | ||
{`Aave Labs does not | ||
guarantee the program and accepts no liability.\n`} | ||
</Trans> | ||
</Box> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// import { AaveV3Sonic } from '@bgd-labs/aave-address-book'; | ||
|
||
const getSonicData = (assetAddress: string): number | undefined => SONIC_DATA_MAP.get(assetAddress); | ||
|
||
const SONIC_DATA_MAP: Map<string, number> = new Map([ | ||
['0xe18Ab82c81E7Eecff32B8A82B1b7d2d23F1EcE96', 4], //AaveV3Sonic.ASSETS.WETH.A_TOKEN | ||
['0x578Ee1ca3a8E1b54554Da1Bf7C583506C4CD11c6', 10], // AaveV3Sonic.ASSETS.USDC.e.A_TOKEN | ||
['0x6C5E14A212c1C3e4Baf6f871ac9B1a969918c131', 8], // AaveV3Sonic.ASSETS.ws.A_TOKEN | ||
]); | ||
|
||
export const useSonicIncentives = (rewardedAsset?: string) => { | ||
if (!rewardedAsset) { | ||
return undefined; | ||
} | ||
|
||
return getSonicData(rewardedAsset); | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1066,10 +1066,10 @@ | |
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" | ||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== | ||
|
||
"@bgd-labs/aave-address-book@4.13.1": | ||
version "4.13.1" | ||
resolved "https://registry.yarnpkg.com/@bgd-labs/aave-address-book/-/aave-address-book-4.13.1.tgz#7ac9e148d0d4c4ab16c83e7eedafc62bbfbebc08" | ||
integrity sha512-ssg586aumbC2j4ZDfe0xgaX8KJgtrK3BocSNJVtgtPsbtnCBkPNT+ogUsBp8uNHF8lfCGkZ92rzHgwlFOf2YfQ== | ||
"@bgd-labs/aave-address-book@4.14.0": | ||
version "4.14.0" | ||
resolved "https://registry.yarnpkg.com/@bgd-labs/aave-address-book/-/aave-address-book-4.14.0.tgz#5f639e1e46c6a6544d6d0d83042278c5ab38e107" | ||
integrity sha512-jm8EgsvL9hiPWsbsKh9J1XYi+0kVZ6FxBRmTj19YHJmR1VovQ7Fup9c3NwKtqetf65gsS7MV5TNAM0sJNsnRcg== | ||
|
||
"@coinbase/[email protected]": | ||
version "4.2.3" | ||
|