diff --git a/src/app/screens/swap/index.tsx b/src/app/screens/swap/index.tsx index f01e5941e..25d6044a5 100644 --- a/src/app/screens/swap/index.tsx +++ b/src/app/screens/swap/index.tsx @@ -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'; @@ -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) { diff --git a/src/app/screens/swap/useMasterCoinsList.tsx b/src/app/screens/swap/useMasterCoinsList.tsx index 891046ff6..51cfd440e 100644 --- a/src/app/screens/swap/useMasterCoinsList.tsx +++ b/src/app/screens/swap/useMasterCoinsList.tsx @@ -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', @@ -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); @@ -40,7 +40,7 @@ const useMasterCoinsList = () => { [ ...(runesFtList || []), btcFt, - ...(!hideStx && isStacksSwapsEnabled ? [stxFt, ...sip10FtList] : []), + ...(!hideStx && isStacksSwapsEnabled ? [stxFt, ...(sip10FtList ?? [])] : []), ] ?? [], [runesFtList, hideStx, isStacksSwapsEnabled, sip10FtList], );