Skip to content

Commit

Permalink
Merge pull request #552 from secretkeylabs/jordankzf/remove-alex-filt…
Browse files Browse the repository at this point in the history
…ering

Remove Alex SIP-10 tokens filtering
  • Loading branch information
m-aboelenein authored Sep 2, 2024
2 parents a0bb30f + c9821bd commit f77d8ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/app/screens/swap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import RequestsRoutes from '@common/utils/route-urls';
import BottomBar from '@components/tabBar';
import TopRow from '@components/topRow';
import useRuneFloorPriceQuery from '@hooks/queries/runes/useRuneFloorPriceQuery';
import { useGetSip10FungibleTokens } from '@hooks/queries/stx/useGetSip10FungibleTokens';
import useGetQuotes from '@hooks/queries/swaps/useGetQuotes';
import useBtcWalletData from '@hooks/queries/useBtcWalletData';
import useCoinRates from '@hooks/queries/useCoinRates';
Expand Down Expand Up @@ -138,7 +139,7 @@ export default function SwapScreen() {
const { quotes, loading: quotesLoading, error: quotesError, fetchQuotes } = useGetQuotes();
const { data: runeFloorPrice } = useRuneFloorPriceQuery(toToken?.name ?? '');
const coinsMasterList = useMasterCoinsList();
const { acceptableCoinList: sip10CoinsList } = useStxCurrencyConversion();
const { data: sip10CoinsList } = useGetSip10FungibleTokens();

useEffect(() => {
if (defaultFrom) {
Expand Down
6 changes: 3 additions & 3 deletions src/app/screens/swap/useMasterCoinsList.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import IconBitcoin from '@assets/img/dashboard/bitcoin_icon.svg';
import IconStacks from '@assets/img/dashboard/stx_icon.svg';
import { useRuneFungibleTokensQuery } from '@hooks/queries/runes/useRuneFungibleTokensQuery';
import { useGetSip10FungibleTokens } from '@hooks/queries/stx/useGetSip10FungibleTokens';
import useHasFeature from '@hooks/useHasFeature';
import useWalletSelector from '@hooks/useWalletSelector';
import { FeatureId, type FungibleToken } from '@secretkeylabs/xverse-core';
import { useMemo } from 'react';
import { useStxCurrencyConversion } from './useStxCurrencyConversion';

export const btcFt: FungibleToken = {
name: 'Bitcoin',
Expand All @@ -30,7 +30,7 @@ export const stxFt: FungibleToken = {
};

const useMasterCoinsList = () => {
const { acceptableCoinList: sip10FtList } = useStxCurrencyConversion();
const { data: sip10FtList } = useGetSip10FungibleTokens();
const { unfilteredData: runesFtList } = useRuneFungibleTokensQuery();
const { hideStx } = useWalletSelector();
const isStacksSwapsEnabled = useHasFeature(FeatureId.STACKS_SWAPS);
Expand All @@ -40,7 +40,7 @@ const useMasterCoinsList = () => {
[
...(runesFtList || []),
btcFt,
...(!hideStx && isStacksSwapsEnabled ? [stxFt, ...sip10FtList] : []),
...(!hideStx && isStacksSwapsEnabled ? [stxFt, ...(sip10FtList ?? [])] : []),
] ?? [],
[runesFtList, hideStx, isStacksSwapsEnabled, sip10FtList],
);
Expand Down

0 comments on commit f77d8ef

Please sign in to comment.