diff --git a/apps/web/src/components/Publication/LensOpenActions/CollectModule/Splits.tsx b/apps/web/src/components/Publication/LensOpenActions/CollectModule/Splits.tsx index bae4d468ef84..79ffacb9595c 100644 --- a/apps/web/src/components/Publication/LensOpenActions/CollectModule/Splits.tsx +++ b/apps/web/src/components/Publication/LensOpenActions/CollectModule/Splits.tsx @@ -3,7 +3,7 @@ import { POLYGONSCAN_URL } from '@hey/data/constants'; import type { Profile, RecipientDataOutput } from '@hey/lens'; import { useProfilesQuery } from '@hey/lens'; import formatAddress from '@hey/lib/formatAddress'; -import getLennyURL from '@hey/lib/getLennyURL'; +import getAvatar from '@hey/lib/getAvatar'; import getProfile from '@hey/lib/getProfile'; import getStampFyiURL from '@hey/lib/getStampFyiURL'; import Link from 'next/link'; @@ -54,11 +54,7 @@ const Splits: FC = ({ recipients }) => { <> Avatar {profile ? ( diff --git a/apps/web/src/components/Publication/LensOpenActions/CollectModule/index.tsx b/apps/web/src/components/Publication/LensOpenActions/CollectModule/index.tsx index 28837220c239..e04a46bc4a0e 100644 --- a/apps/web/src/components/Publication/LensOpenActions/CollectModule/index.tsx +++ b/apps/web/src/components/Publication/LensOpenActions/CollectModule/index.tsx @@ -5,6 +5,7 @@ import Slug from '@components/Shared/Slug'; import { BanknotesIcon, ClockIcon, + CurrencyDollarIcon, PhotoIcon, PuzzlePieceIcon, RectangleStackIcon, @@ -20,6 +21,7 @@ import type { SimpleCollectOpenActionSettings } from '@hey/lens'; import { FollowModuleType } from '@hey/lens'; +import getAllTokens from '@hey/lib/api/getAllTokens'; import formatAddress from '@hey/lib/formatAddress'; import getAssetSymbol from '@hey/lib/getAssetSymbol'; import getProfile from '@hey/lib/getProfile'; @@ -47,6 +49,11 @@ const CollectModule: FC = ({ publication, openAction }) => { ? publication?.mirrorOn : publication; + const { data: allowedTokens } = useQuery({ + queryKey: ['getAllTokens'], + queryFn: () => getAllTokens() + }); + const [showCollectorsModal, setShowCollectorsModal] = useState(false); const [countOpenActions, setCountOpenActions] = useState( targetPublication.stats.countOpenActions @@ -66,6 +73,8 @@ const CollectModule: FC = ({ publication, openAction }) => { const isMultirecipientFeeCollectModule = collectModule.__typename === 'MultirecipientFeeCollectOpenActionSettings'; const percentageCollected = (countOpenActions / collectLimit) * 100; + const enabledTokens = allowedTokens?.map((t) => t.symbol); + const isTokenEnabled = enabledTokens?.includes(currency); const { data: usdPrice } = useQuery({ queryKey: ['getRedstonePrice', currency], @@ -108,18 +117,22 @@ const CollectModule: FC = ({ publication, openAction }) => { {amount ? (
- {currency} + {isTokenEnabled ? ( + {currency} + ) : ( + + )} {amount} {currency} - {usdPrice ? ( + {isTokenEnabled && usdPrice ? ( <> ยท