Skip to content

Commit

Permalink
Remove filters
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredvu committed Aug 14, 2024
1 parent 71d9c2c commit 5e05812
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions src/views/forms/NewMarketForm/NewMarketSelectionStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ import { DialogTypes } from '@/constants/dialogs';
import { STRING_KEYS } from '@/constants/localization';
import { isMainnet } from '@/constants/networks';
import { TOKEN_DECIMALS } from '@/constants/numbers';
import {
NUM_ORACLES_TO_QUALIFY_AS_SAFE,
type NewMarketProposal,
} from '@/constants/potentialMarkets';
import { type NewMarketProposal } from '@/constants/potentialMarkets';

import { useAccountBalance } from '@/hooks/useAccountBalance';
import { useBreakpoints } from '@/hooks/useBreakpoints';
Expand Down Expand Up @@ -108,20 +105,12 @@ export const NewMarketSelectionStep = ({
}, [assetToAdd]);

const filteredPotentialMarkets = useMemo(() => {
return potentialMarkets?.filter(({ params: { ticker, exchangeConfigJson, marketType } }) => {
return potentialMarkets?.filter(({ params: { ticker } }) => {
if (marketIds.includes(ticker)) {
return false;
}

if (marketType === 'PERPETUAL_MARKET_TYPE_ISOLATED') {
return exchangeConfigJson.length > 0;
}

if (exchangeConfigJson.length >= NUM_ORACLES_TO_QUALIFY_AS_SAFE) {
return true;
}

return false;
return true;
});
}, [potentialMarkets, marketIds]);

Expand Down

0 comments on commit 5e05812

Please sign in to comment.