diff --git a/packages/mobile/src/core/Send/hooks/useSuggestedAddresses.ts b/packages/mobile/src/core/Send/hooks/useSuggestedAddresses.ts index 295a683ee..c18d7d3e4 100644 --- a/packages/mobile/src/core/Send/hooks/useSuggestedAddresses.ts +++ b/packages/mobile/src/core/Send/hooks/useSuggestedAddresses.ts @@ -7,7 +7,6 @@ import { SuggestedAddress, SuggestedAddressType } from '../Send.interface'; import { walletAddressSelector } from '$store/wallet'; import { CryptoCurrencies } from '$shared/constants'; import { Tonapi } from '$libs/Tonapi'; -import { useStakingStore } from '$store'; import { ActionItem, ActionType, Address } from '@tonkeeper/core'; import { tk } from '@tonkeeper/shared/tonkeeper'; @@ -22,8 +21,6 @@ export const useSuggestedAddresses = () => { useSelector(favoritesSelector); const address = useSelector(walletAddressSelector); - const stakingPools = useStakingStore((s) => s.pools.map((pool) => pool.address)); - const favoriteAddresses = useMemo( (): SuggestedAddress[] => favorites @@ -66,7 +63,8 @@ export const useSuggestedAddresses = () => { !recipientAddress || Address.compare(walletAddress, recipientAddress) || payload.sender?.is_scam || - payload.recipient?.is_scam + payload.recipient?.is_scam || + !payload.recipient?.is_wallet ) { return false; } @@ -76,17 +74,11 @@ export const useSuggestedAddresses = () => { Address.compare(favorite.address, recipientAddress), ) !== -1; - const isStakingPool = - stakingPools.findIndex((poolAddress) => - Address.compare(poolAddress, recipientAddress), - ) !== -1; - const rawAddress = Address.parse(recipientAddress).toRaw(); if ( hiddenRecentAddresses.some((addr) => Address.compare(addr, rawAddress)) || - isFavorite || - isStakingPool + isFavorite ) { return false; } @@ -105,7 +97,7 @@ export const useSuggestedAddresses = () => { ); return uniqBy(addresses, (item) => item.address).slice(0, 8); - }, [address, favoriteAddresses, hiddenRecentAddresses, stakingPools]); + }, [address, favoriteAddresses, hiddenRecentAddresses]); const suggestedAddresses = useMemo( () => [...favoriteAddresses, ...recentAddresses],