Skip to content

Commit

Permalink
add lbsp tag to pool info view
Browse files Browse the repository at this point in the history
  • Loading branch information
Ridel1e committed Nov 27, 2023
1 parent cb0dc5d commit 20aa87a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,6 @@
]
},
"engines": {
"node": "^19"
"node": "^20"
}
}
7 changes: 7 additions & 0 deletions src/pages/PoolOverview/PoolInfoView/PoolInfoView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -40,6 +43,7 @@ export const PoolInfoView: FC<PoolInfoProps> = ({ 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}`);
Expand Down Expand Up @@ -119,6 +123,9 @@ export const PoolInfoView: FC<PoolInfoProps> = ({ position }) => {
<DeprecatedPoolTag />
</Flex.Item>
)}
{!s && (_isLbspPool || isSpfPool(position.pool.id)) && (
<LbspPoolTag isSpf={isSpfPool(position.pool.id)} />
)}
{hasFarmForPool && (
<FarmsButton onClick={handleFarmsButtonClick} />
)}
Expand Down

0 comments on commit 20aa87a

Please sign in to comment.