Skip to content

Commit

Permalink
Yield Farm Refactoring (#2507)
Browse files Browse the repository at this point in the history
* fix: PT_BR promo banners for SOV-2072

* feat: move DLLR AMM pool to start of lists
  • Loading branch information
soulBit authored Mar 20, 2023
1 parent 06f1512 commit f5a768c
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 57 deletions.
28 changes: 14 additions & 14 deletions src/app/components/Promotions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ export const Promotions: React.FC<PromotionsProps> = ({
<PromotionsCarousel className="tw-w-full">
<PromotionCard
appSection={AppSection.YieldFarm}
backgroundColor={PromotionColor.Yellow}
title={t(translations.promotions.card3.title)}
duration={t(translations.promotions.card3.duration)}
text={t(translations.promotions.card3.text)}
backgroundColor={PromotionColor.Orange}
title={t(translations.promotions.card6.title)}
text={t(translations.promotions.card6.text)}
duration={t(translations.promotions.card6.duration)}
learnMoreLink={learnMoreYieldFarming}
logoAsset1={Asset.XUSD}
logoAsset1={Asset.DLLR}
logoAsset2={Asset.RBTC}
linkAsset={LiquidityPoolDictionary.get(Asset.XUSD, Asset.RBTC)?.key}
linkDataActionId={`landing-promo-learnmore-${Asset.XUSD}`}
linkAsset={LiquidityPoolDictionary.get(Asset.DLLR, Asset.RBTC)?.key}
linkDataActionId={`landing-promo-learnmore-${Asset.DLLR}`}
className={cardClassName}
imageClassName={cardImageClassName}
/>
Expand All @@ -66,15 +66,15 @@ export const Promotions: React.FC<PromotionsProps> = ({
/>
<PromotionCard
appSection={AppSection.YieldFarm}
backgroundColor={PromotionColor.Orange}
title={t(translations.promotions.card6.title)}
text={t(translations.promotions.card6.text)}
duration={t(translations.promotions.card6.duration)}
backgroundColor={PromotionColor.Yellow}
title={t(translations.promotions.card3.title)}
duration={t(translations.promotions.card3.duration)}
text={t(translations.promotions.card3.text)}
learnMoreLink={learnMoreYieldFarming}
logoAsset1={Asset.DLLR}
logoAsset1={Asset.XUSD}
logoAsset2={Asset.RBTC}
linkAsset={LiquidityPoolDictionary.get(Asset.DLLR, Asset.RBTC)?.key}
linkDataActionId={`landing-promo-learnmore-${Asset.DLLR}`}
linkAsset={LiquidityPoolDictionary.get(Asset.XUSD, Asset.RBTC)?.key}
linkDataActionId={`landing-promo-learnmore-${Asset.XUSD}`}
className={cardClassName}
imageClassName={cardImageClassName}
/>
Expand Down
43 changes: 21 additions & 22 deletions src/app/pages/LiquidityMining/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,17 @@ export function LiquidityMining() {
/> */}
<PromotionCard
appSection={AppSection.YieldFarm}
backgroundColor={PromotionColor.Yellow}
title={t(translations.promotions.card3.title)}
text={t(translations.promotions.card3.text)}
backgroundColor={PromotionColor.Orange}
title={t(translations.promotions.card6.title)}
text={t(translations.promotions.card6.text)}
duration={t(translations.liquidityMining.recalibration, {
date,
})}
learnMoreLink={learnMoreYieldFarming}
logoAsset1={Asset.XUSD}
logoAsset1={Asset.DLLR}
logoAsset2={Asset.RBTC}
linkAsset={LiquidityPoolDictionary.get(Asset.XUSD, Asset.RBTC)?.key}
linkDataActionId={`yieldfarm-promo-learnmore-${Asset.XUSD}`}
linkAsset={LiquidityPoolDictionary.get(Asset.DLLR, Asset.RBTC)?.key}
linkDataActionId={`yieldfarm-promo-learnmore-${Asset.DLLR}`}
imageClassName="tw-transform tw-scale-85"
/>
<PromotionCard
Expand All @@ -114,6 +114,21 @@ export function LiquidityMining() {
linkDataActionId={`yieldfarm-promo-learnmore-${Asset.SOV}`}
imageClassName="tw-transform tw-scale-85"
/>
<PromotionCard
appSection={AppSection.YieldFarm}
backgroundColor={PromotionColor.Yellow}
title={t(translations.promotions.card3.title)}
text={t(translations.promotions.card3.text)}
duration={t(translations.liquidityMining.recalibration, {
date,
})}
learnMoreLink={learnMoreYieldFarming}
logoAsset1={Asset.XUSD}
logoAsset2={Asset.RBTC}
linkAsset={LiquidityPoolDictionary.get(Asset.XUSD, Asset.RBTC)?.key}
linkDataActionId={`yieldfarm-promo-learnmore-${Asset.XUSD}`}
imageClassName="tw-transform tw-scale-85"
/>
{/* <PromotionCard
appSection={AppSection.YieldFarm}
backgroundColor={PromotionColor.Green}
Expand All @@ -129,22 +144,6 @@ export function LiquidityMining() {
linkDataActionId={`yieldfarm-promo-learnmore-${Asset.ETH}`}
imageClassName="tw-transform tw-scale-85"
/> */}

<PromotionCard
appSection={AppSection.YieldFarm}
backgroundColor={PromotionColor.Orange}
title={t(translations.promotions.card6.title)}
text={t(translations.promotions.card6.text)}
duration={t(translations.liquidityMining.recalibration, {
date,
})}
learnMoreLink={learnMoreYieldFarming}
logoAsset1={Asset.DLLR}
logoAsset2={Asset.RBTC}
linkAsset={LiquidityPoolDictionary.get(Asset.DLLR, Asset.RBTC)?.key}
linkDataActionId={`yieldfarm-promo-learnmore-${Asset.DLLR}`}
imageClassName="tw-transform tw-scale-85"
/>
</PromotionsCarousel>

<AmmPoolsBanner onDataNotPresent={onOldPoolsNotPresent} />
Expand Down
15 changes: 10 additions & 5 deletions src/locales/pt_br/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -2690,19 +2690,24 @@
"text": "Deposite qualquer quantia de XUSD neste pool de empréstimo e comece agora mesmo a acumular sua parte nos 2,500 SOVs."
},
"card3": {
"title": "25K SOVs bônus",
"title": "15K SOVs bônus",
"duration": "Toda semana",
"text": "Deposite XUSD e rBTC neste pool de liquidez e comece agora mesmo a acumular sua parte nos 25,000 SOVs."
"text": "Deposite XUSD e RBTC neste pool de liquidez e comece agora mesmo a acumular sua parte nos 15,000 SOVs."
},
"card4": {
"title": "25K SOVs bônus",
"title": "15K SOVs bônus",
"duration": "Toda semana",
"text": "Deposite SOV e rBTC neste pool de liquidez e comece agora mesmo a acumular sua parte nos 25,000 SOVs."
"text": "Deposite SOV e RBTC neste pool de liquidez e comece agora mesmo a acumular sua parte nos 15,000 SOVs."
},
"card5": {
"title": "5K SOVs bônus",
"duration": "Toda semana",
"text": "Deposite ETH e rBTC neste pool de liquidez e comece agora mesmo a acumular sua parte nos 5,000 SOVs."
"text": "Deposite ETH e RBTC neste pool de liquidez e comece agora mesmo a acumular sua parte nos 5,000 SOVs."
},
"card6": {
"title": "30K SOVs bônus",
"duration": "Toda semana",
"text": "Deposite DLLR e RBTC neste pool de liquidez e comece agora mesmo a acumular sua parte nos 30,000 SOVs."
}
},
"liquidityMining": {
Expand Down
16 changes: 8 additions & 8 deletions src/utils/dictionaries/amm/mainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ import { Asset } from 'types/asset';
import { AmmLiquidityPool } from 'utils/models/amm-liquidity-pool';

export const mainnetAmm = [
new AmmLiquidityPool(
Asset.DLLR,
Asset.RBTC,
1,
AppMode.MAINNET,
'0xe81373285eb8cdee2e0108e98c5aa022948da9d2',
'0x3D5eDF3201876BF6935090C319FE3Ff36ED3D494',
).setPromotionColor(PromotionColor.Orange),
new AmmLiquidityPool(
Asset.SOV,
Asset.RBTC,
Expand All @@ -17,14 +25,6 @@ export const mainnetAmm = [
'0x3fd679b01ddab34da8f72b7ec301aa75ea25f338',
'0x88a67a0e79e311fe93c6e2101d55d6d2ae3a7e94',
]),
new AmmLiquidityPool(
Asset.DLLR,
Asset.RBTC,
1,
AppMode.MAINNET,
'0xe81373285eb8cdee2e0108e98c5aa022948da9d2',
'0x3D5eDF3201876BF6935090C319FE3Ff36ED3D494',
).setPromotionColor(PromotionColor.Orange),
new AmmLiquidityPool(
Asset.XUSD,
Asset.RBTC,
Expand Down
16 changes: 8 additions & 8 deletions src/utils/dictionaries/amm/testnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ import { Asset } from 'types/asset';
import { AmmLiquidityPool } from 'utils/models/amm-liquidity-pool';

export const testnetAmm = [
new AmmLiquidityPool(
Asset.DLLR,
Asset.RBTC,
1,
AppMode.TESTNET,
'0x5fc0b3ac4683bd8af8e244e646d897a2c3f2a6ac',
'0x64B1aC8301f64c92721804ed78f2ee6025aaf7cE',
).setPromotionColor(PromotionColor.Orange),
new AmmLiquidityPool(
Asset.SOV,
Asset.RBTC,
Expand Down Expand Up @@ -104,12 +112,4 @@ export const testnetAmm = [
'0x84953dAF0E7a9fFb8B4fDf7F948185e1cF85852e',
'0xB12FA09a50c56e9a0C826b98e76DA7645017AB4D',
),
new AmmLiquidityPool(
Asset.DLLR,
Asset.RBTC,
1,
AppMode.TESTNET,
'0x5fc0b3ac4683bd8af8e244e646d897a2c3f2a6ac',
'0x64B1aC8301f64c92721804ed78f2ee6025aaf7cE',
).setPromotionColor(PromotionColor.Orange),
];

0 comments on commit f5a768c

Please sign in to comment.