Skip to content

Commit

Permalink
Remove usn near x pool (#477)
Browse files Browse the repository at this point in the history
* Remove Usn NearX pool

* filter usn and nearx token in pool list only for display

---------

Co-authored-by: lq0-github <[email protected]>
Co-authored-by: xieqian <[email protected]>
  • Loading branch information
3 people authored Feb 23, 2024
1 parent 11aa78d commit 81b4438
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
13 changes: 10 additions & 3 deletions src/pages/pools/LiquidityPage/LiquidityPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ import {
const HIDE_LOW_TVL = 'REF_FI_HIDE_LOW_TVL';

const REF_FI_FARM_ONLY = 'REF_FI_FARM_ONLY';
export const BLACK_TOKEN_IDS_IN_POOL = ['usn', 'v2-nearx.stader-labs.near'];
export function getPoolFeeAprTitle(
dayVolume: string,
pool: Pool,
Expand Down Expand Up @@ -1786,6 +1787,11 @@ export default function LiquidityPage() {
if (farmOnly) {
tempPools = _.filter(tempPools, (pool) => !!farmCounts[pool.id]);
}
tempPools = _.filter(tempPools, (pool) =>
pool?.tokenIds?.every(
(tokenId) => !BLACK_TOKEN_IDS_IN_POOL.includes(tokenId)
)
);
setDisplayPools(tempPools);
}, [pools, hideLowTVL, farmOnly, farmCounts]);
const poolTokenMetas = usePoolTokens(pools);
Expand Down Expand Up @@ -2622,11 +2628,12 @@ function StablePoolList({

const [clicked, setClicked] = useState<boolean>(false);

const allStablePoolData = useAllStablePoolData();

let allStablePoolData = useAllStablePoolData();
if (!allStablePoolData || allStablePoolData.some((pd) => !pd))
return <Loading />;

allStablePoolData = _.filter(allStablePoolData, (pool) =>
pool?.tokens?.every((token) => !BLACK_TOKEN_IDS_IN_POOL.includes(token.id))
);
const filterFunc = (p: PoolData) => {
const b1 =
option === 'ALL'
Expand Down
7 changes: 5 additions & 2 deletions src/pages/pools/poolsComponents/StablePoolList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import BigNumber from 'bignumber.js';
import { Cell, Pie, PieChart, Sector } from 'recharts';
import getConfig from 'src/services/config';
import Big from 'big.js';
import { BLACK_TOKEN_IDS_IN_POOL } from '../LiquidityPage/LiquidityPage';

function StablePoolList({
searchBy,
Expand All @@ -66,11 +67,13 @@ function StablePoolList({

const [clicked, setClicked] = useState<boolean>(false);

const allStablePoolData = useAllStablePoolData();
let allStablePoolData = useAllStablePoolData();

if (!allStablePoolData || allStablePoolData.some((pd) => !pd))
return <Loading />;

allStablePoolData = _.filter(allStablePoolData, (pool) =>
pool?.tokens?.every((token) => !BLACK_TOKEN_IDS_IN_POOL.includes(token.id))
);
const filterFunc = (p: PoolData) => {
const b1 =
option === 'ALL'
Expand Down

0 comments on commit 81b4438

Please sign in to comment.