From 100e0e19ace43899dfc5c3d90b341a01d7e6e578 Mon Sep 17 00:00:00 2001 From: vkulinich Date: Thu, 22 Feb 2024 11:00:27 +0100 Subject: [PATCH 1/3] Update pools fee --- src/sections/pools/pool/details/PoolDetails.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/sections/pools/pool/details/PoolDetails.tsx b/src/sections/pools/pool/details/PoolDetails.tsx index 7e9c89529..d1d057f05 100644 --- a/src/sections/pools/pool/details/PoolDetails.tsx +++ b/src/sections/pools/pool/details/PoolDetails.tsx @@ -26,6 +26,7 @@ import { import { useAccount } from "sections/web3-connect/Web3Connect.utils" import { useOmnipoolFee } from "api/omnipool" import Skeleton from "react-loading-skeleton" +import { BN_0 } from "utils/constants" export const PoolDetails = ({ pool, @@ -190,6 +191,12 @@ export const PoolDetails = ({ {ixXYKPool ? ( t("value.percentage", { value: pool.fee }) + ) : pool.id === assets.native.id ? ( + t("value.percentage", { value: BN_0 }) + ) : pool.stablepoolFee ? ( + t("value.percentage", { + value: pool.stablepoolFee.times(100), + }) ) : omnipoolFee.isLoading ? ( ) : ( From 07caf3ad328a520b1ff5c545c4780c4ff8891fa0 Mon Sep 17 00:00:00 2001 From: vkulinich Date: Mon, 26 Feb 2024 11:01:10 +0100 Subject: [PATCH 2/3] update hdx fee --- src/sections/pools/pool/details/PoolDetails.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sections/pools/pool/details/PoolDetails.tsx b/src/sections/pools/pool/details/PoolDetails.tsx index d1d057f05..68a7b0c2b 100644 --- a/src/sections/pools/pool/details/PoolDetails.tsx +++ b/src/sections/pools/pool/details/PoolDetails.tsx @@ -26,7 +26,6 @@ import { import { useAccount } from "sections/web3-connect/Web3Connect.utils" import { useOmnipoolFee } from "api/omnipool" import Skeleton from "react-loading-skeleton" -import { BN_0 } from "utils/constants" export const PoolDetails = ({ pool, @@ -192,7 +191,7 @@ export const PoolDetails = ({ {ixXYKPool ? ( t("value.percentage", { value: pool.fee }) ) : pool.id === assets.native.id ? ( - t("value.percentage", { value: BN_0 }) + "--" ) : pool.stablepoolFee ? ( t("value.percentage", { value: pool.stablepoolFee.times(100), From 1eeb3bbca0693a158626632b5574123b3f552934 Mon Sep 17 00:00:00 2001 From: vkulinich Date: Mon, 26 Feb 2024 11:42:44 +0100 Subject: [PATCH 3/3] update gdx lp fee --- .../modals/AddLiquidity/AddLiquidityForm.tsx | 17 ++++++++++++----- src/sections/pools/table/PoolsTable.utils.tsx | 5 ++++- .../sections/omnipoolAsset/stats/AssetStats.tsx | 8 +++++++- .../OmnipoolAssetsTableWrapper.utils.tsx | 10 +++++++++- 4 files changed, 32 insertions(+), 8 deletions(-) diff --git a/src/sections/pools/modals/AddLiquidity/AddLiquidityForm.tsx b/src/sections/pools/modals/AddLiquidity/AddLiquidityForm.tsx index d826bbf7e..eef901f5c 100644 --- a/src/sections/pools/modals/AddLiquidity/AddLiquidityForm.tsx +++ b/src/sections/pools/modals/AddLiquidity/AddLiquidityForm.tsx @@ -59,7 +59,10 @@ export const AddLiquidityForm = ({ const { calculatedShares, spotPrice, omnipoolFee, assetMeta, assetBalance } = useAddLiquidity(assetId, assetValue) - const { api } = useRpcProvider() + const { + api, + assets: { native }, + } = useRpcProvider() const { createTransaction } = useStore() const { data: limits } = useVerifyLimits({ @@ -214,10 +217,14 @@ export const AddLiquidityForm = ({ /> diff --git a/src/sections/pools/table/PoolsTable.utils.tsx b/src/sections/pools/table/PoolsTable.utils.tsx index fa6ba6a01..4939638ad 100644 --- a/src/sections/pools/table/PoolsTable.utils.tsx +++ b/src/sections/pools/table/PoolsTable.utils.tsx @@ -303,6 +303,9 @@ const APY = ({ isLoading: boolean }) => { const { t } = useTranslation() + const { + assets: { native }, + } = useRpcProvider() const farms = useFarms([assetId]) if (isLoading || farms.isInitialLoading) return @@ -313,7 +316,7 @@ const APY = ({ return ( - {t("value.percentage", { value: fee })} + {assetId === native.id ? "--" : t("value.percentage", { value: fee })} ) diff --git a/src/sections/stats/sections/omnipoolAsset/stats/AssetStats.tsx b/src/sections/stats/sections/omnipoolAsset/stats/AssetStats.tsx index 3971812f3..61ad234cb 100644 --- a/src/sections/stats/sections/omnipoolAsset/stats/AssetStats.tsx +++ b/src/sections/stats/sections/omnipoolAsset/stats/AssetStats.tsx @@ -4,6 +4,7 @@ import BN from "bignumber.js" import { Farm, useFarmAprs, useFarms } from "api/farms" import { useMemo } from "react" import { BN_0 } from "utils/constants" +import { useRpcProvider } from "providers/rpcProvider" const APYFarmStatsCard = ({ farms, apy }: { farms: Farm[]; apy: number }) => { const { t } = useTranslation() @@ -56,6 +57,9 @@ const APYStatsCard = ({ fee: BN }) => { const { t } = useTranslation() + const { + assets: { native }, + } = useRpcProvider() const farms = useFarms([assetId]) if (farms.data?.length) @@ -64,7 +68,9 @@ const APYStatsCard = ({ return ( diff --git a/src/sections/stats/sections/overview/components/OmnipoolAssetsTableWrapper/OmnipoolAssetsTableWrapper.utils.tsx b/src/sections/stats/sections/overview/components/OmnipoolAssetsTableWrapper/OmnipoolAssetsTableWrapper.utils.tsx index 125d4f9fd..257140a2a 100644 --- a/src/sections/stats/sections/overview/components/OmnipoolAssetsTableWrapper/OmnipoolAssetsTableWrapper.utils.tsx +++ b/src/sections/stats/sections/overview/components/OmnipoolAssetsTableWrapper/OmnipoolAssetsTableWrapper.utils.tsx @@ -18,6 +18,7 @@ import { BN_0 } from "utils/constants" import BigNumber from "bignumber.js" import { InfoTooltip } from "components/InfoTooltip/InfoTooltip" import { SInfoIcon } from "components/InfoTooltip/InfoTooltip.styled" +import { useRpcProvider } from "providers/rpcProvider" const APYFarming = ({ farms, apy }: { farms: Farm[]; apy: number }) => { const { t } = useTranslation() @@ -72,6 +73,9 @@ const APY = ({ isLoading: boolean }) => { const { t } = useTranslation() + const { + assets: { native }, + } = useRpcProvider() const farms = useFarms([assetId]) if (isLoading || farms.isInitialLoading) return @@ -79,7 +83,11 @@ const APY = ({ if (farms.data?.length) return - return {t("value.percentage", { value: fee })} + return ( + + {assetId === native.id ? "--" : t("value.percentage", { value: fee })} + + ) } export const useOmnipoolAssetsColumns = (): OmnipoolAssetsTableColumn[] => {