From 4622d363cbf3a67e2c07bcb2e6b9f86d0049c42f Mon Sep 17 00:00:00 2001 From: jinoosss Date: Fri, 24 May 2024 16:01:41 +0900 Subject: [PATCH] feat: Migrate reward type --- .../pool/my-liquidity-content/MyLiquidityContent.tsx | 4 ++++ .../src/components/pool/my-position-card/MyPositionCard.tsx | 2 ++ packages/web/src/constants/option.constant.ts | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/web/src/components/pool/my-liquidity-content/MyLiquidityContent.tsx b/packages/web/src/components/pool/my-liquidity-content/MyLiquidityContent.tsx index 7a218e360..1358efe79 100644 --- a/packages/web/src/components/pool/my-liquidity-content/MyLiquidityContent.tsx +++ b/packages/web/src/components/pool/my-liquidity-content/MyLiquidityContent.tsx @@ -146,6 +146,7 @@ const MyLiquidityContent: React.FC = ({ SWAP_FEE: {}, STAKING: {}, EXTERNAL: {}, + INTERNAL: {}, }; positions .flatMap(position => position.reward) @@ -188,6 +189,7 @@ const MyLiquidityContent: React.FC = ({ SWAP_FEE: Object.values(infoMap["SWAP_FEE"]), STAKING: Object.values(infoMap["STAKING"]), EXTERNAL: Object.values(infoMap["EXTERNAL"]), + INTERNAL: Object.values(infoMap["INTERNAL"]), }; }, [isDisplay, positions, tokenPrices]); @@ -203,6 +205,7 @@ const MyLiquidityContent: React.FC = ({ SWAP_FEE: {}, STAKING: {}, EXTERNAL: {}, + INTERNAL: {}, }; positions .flatMap(position => position.reward) @@ -229,6 +232,7 @@ const MyLiquidityContent: React.FC = ({ SWAP_FEE: Object.values(infoMap["SWAP_FEE"]), STAKING: Object.values(infoMap["STAKING"]), EXTERNAL: Object.values(infoMap["EXTERNAL"]), + INTERNAL: Object.values(infoMap["INTERNAL"]), }; }, [isDisplay, positions, tokenPrices]); diff --git a/packages/web/src/components/pool/my-position-card/MyPositionCard.tsx b/packages/web/src/components/pool/my-position-card/MyPositionCard.tsx index 318d6cf54..bad8ae7a3 100644 --- a/packages/web/src/components/pool/my-position-card/MyPositionCard.tsx +++ b/packages/web/src/components/pool/my-position-card/MyPositionCard.tsx @@ -214,6 +214,7 @@ const MyPositionCard: React.FC = ({ SWAP_FEE: [], STAKING: [], EXTERNAL: [], + INTERNAL: [], }, ); @@ -282,6 +283,7 @@ const MyPositionCard: React.FC = ({ SWAP_FEE: [], STAKING: [], EXTERNAL: [], + INTERNAL: [], }, ); return aprRewardInfo; diff --git a/packages/web/src/constants/option.constant.ts b/packages/web/src/constants/option.constant.ts index 2d1323c0d..994501b5d 100644 --- a/packages/web/src/constants/option.constant.ts +++ b/packages/web/src/constants/option.constant.ts @@ -331,7 +331,7 @@ export type AddLiquiditySubmitType = | "SELECT_TOKEN" | "AMOUNT_TOO_LOW"; -export type RewardType = "SWAP_FEE" | "STAKING" | "EXTERNAL"; +export type RewardType = "SWAP_FEE" | "STAKING" | "EXTERNAL" | "INTERNAL"; export type StakingPeriodType = "5D" | "10D" | "30D" | "MAX";