From 20aa87ab13b71638d83d190aea9d6b0c9c317810 Mon Sep 17 00:00:00 2001 From: ridel1e Date: Mon, 27 Nov 2023 12:13:55 +0300 Subject: [PATCH] add lbsp tag to pool info view --- package.json | 2 +- src/pages/PoolOverview/PoolInfoView/PoolInfoView.tsx | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 1fa1198b6..42a0582ee 100644 --- a/package.json +++ b/package.json @@ -113,6 +113,6 @@ ] }, "engines": { - "node": "^19" + "node": "^20" } } diff --git a/src/pages/PoolOverview/PoolInfoView/PoolInfoView.tsx b/src/pages/PoolOverview/PoolInfoView/PoolInfoView.tsx index ac1e87a2e..b23f7ab23 100644 --- a/src/pages/PoolOverview/PoolInfoView/PoolInfoView.tsx +++ b/src/pages/PoolOverview/PoolInfoView/PoolInfoView.tsx @@ -23,10 +23,13 @@ import { isDeprecatedPool } from '../../../common/utils/isDeprecatedPool'; import { ConnectWalletButton } from '../../../components/common/ConnectWalletButton/ConnectWalletButton'; import { DeprecatedPoolTag } from '../../../components/DeprecatedPoolTag/DeprecatedPoolTag'; import { FarmsButton } from '../../../components/FarmsButton/FarmsButton'; +import { LbspPoolTag } from '../../../components/LbspPoolTag/LbspPoolTag.tsx'; import { PageHeader } from '../../../components/Page/PageHeader/PageHeader'; import { redeem } from '../../../gateway/api/operations/redeem'; import { useSelectedNetwork } from '../../../gateway/common/network'; +import { isLbspPool } from '../../../network/cardano/api/lbspWhitelist/lbspWhitelist.ts'; import { hasFarmsForPool } from '../../../network/ergo/lm/api/farms/farms'; +import { isSpfPool } from '../../../utils/lbsp.ts'; import { MyLiquidity } from './MyLiquidity/MyLiquidity'; import { PoolFeeTag } from './PoolFeeTag/PoolFeeTag'; import { TotalLiquidity } from './TotalLiquidity/TotalLiquidity'; @@ -40,6 +43,7 @@ export const PoolInfoView: FC = ({ position }) => { const navigate = useNavigate(); const [selectedNetwork] = useSelectedNetwork(); const [hasFarmForPool] = useObservable(hasFarmsForPool(position.pool.id), []); + const [_isLbspPool] = useObservable(isLbspPool(position.pool.id)); const handleFarmsButtonClick = () => navigate(`../../../farm?searchString=${position?.pool.id}`); @@ -119,6 +123,9 @@ export const PoolInfoView: FC = ({ position }) => { )} + {!s && (_isLbspPool || isSpfPool(position.pool.id)) && ( + + )} {hasFarmForPool && ( )}