From ee4187faa3a40aa55a3398285e3e9099a2ad7c8e Mon Sep 17 00:00:00 2001 From: bigint Date: Thu, 28 Sep 2023 09:15:22 +0530 Subject: [PATCH] refactor: types to new name --- apps/web/src/components/Channel/Details.tsx | 2 +- apps/web/src/components/Channel/Feed.tsx | 2 +- apps/web/src/components/Channel/index.tsx | 2 +- .../components/Composer/NewPublication.tsx | 4 +-- .../OpenActions/Snapshot/index.tsx | 4 +-- .../web/src/components/Shared/Attachments.tsx | 4 +-- .../src/components/Shared/Channel/Join.tsx | 2 +- .../src/components/Shared/Channel/Mint.tsx | 2 +- apps/web/src/hooks/useUploadAttachments.tsx | 36 +++++++++---------- apps/web/src/lib/getAlgorithmicFeed.ts | 8 ++--- apps/web/src/lib/getChannelByTag.ts | 2 +- apps/web/src/lib/uploadToIPFS.ts | 2 +- apps/web/src/store/app.ts | 2 +- apps/web/src/store/publication.ts | 10 +++--- packages/data/algorithms.ts | 4 +-- packages/data/constants.ts | 4 +-- packages/data/enums.ts | 6 ++-- packages/types/{lenster.d.ts => hey.d.ts} | 0 packages/types/misc.d.ts | 2 +- .../feeds/src/handlers/getPublicationIds.ts | 6 ++-- .../src/providers/{lenster => hey}/README.md | 0 .../algorithms/heyMostInteracted.ts} | 4 +-- .../algorithms/heyMostViewed.ts} | 4 +-- .../{lenster => hey}/clickhouseQuery.ts | 0 .../{lenster => hey}/docs/MostInteracted.md | 0 .../{lenster => hey}/docs/MostViewed.md | 0 .../feeds/src/providers/hey/heyFeed.ts | 21 +++++++++++ .../src/providers/lenster/lensterFeed.ts | 21 ----------- .../snapshot-relay/src/handlers/createPoll.ts | 6 ++-- 29 files changed, 79 insertions(+), 81 deletions(-) rename packages/types/{lenster.d.ts => hey.d.ts} (100%) rename packages/workers/feeds/src/providers/{lenster => hey}/README.md (100%) rename packages/workers/feeds/src/providers/{lenster/algorithms/lensterMostInteracted.ts => hey/algorithms/heyMostInteracted.ts} (96%) rename packages/workers/feeds/src/providers/{lenster/algorithms/lensterMostViewed.ts => hey/algorithms/heyMostViewed.ts} (94%) rename packages/workers/feeds/src/providers/{lenster => hey}/clickhouseQuery.ts (100%) rename packages/workers/feeds/src/providers/{lenster => hey}/docs/MostInteracted.md (100%) rename packages/workers/feeds/src/providers/{lenster => hey}/docs/MostViewed.md (100%) create mode 100644 packages/workers/feeds/src/providers/hey/heyFeed.ts delete mode 100644 packages/workers/feeds/src/providers/lenster/lensterFeed.ts diff --git a/apps/web/src/components/Channel/Details.tsx b/apps/web/src/components/Channel/Details.tsx index a66633b203a3..56e11024b283 100644 --- a/apps/web/src/components/Channel/Details.tsx +++ b/apps/web/src/components/Channel/Details.tsx @@ -5,7 +5,7 @@ import { ClockIcon } from '@heroicons/react/24/outline'; import { FireIcon } from '@heroicons/react/24/solid'; import { STATIC_IMAGES_URL } from '@hey/data/constants'; import formatHandle from '@hey/lib/formatHandle'; -import type { Channel } from '@hey/types/lenster'; +import type { Channel } from '@hey/types/hey'; import { Image, LightBox, Tooltip } from '@hey/ui'; import { formatDate } from '@lib/formatTime'; import { t } from '@lingui/macro'; diff --git a/apps/web/src/components/Channel/Feed.tsx b/apps/web/src/components/Channel/Feed.tsx index b22fba5d3445..52e1704c3adc 100644 --- a/apps/web/src/components/Channel/Feed.tsx +++ b/apps/web/src/components/Channel/Feed.tsx @@ -7,7 +7,7 @@ import { PublicationTypes, useExploreFeedQuery } from '@hey/lens'; -import type { Channel } from '@hey/types/lenster'; +import type { Channel } from '@hey/types/hey'; import { Card, EmptyState, ErrorMessage } from '@hey/ui'; import { t } from '@lingui/macro'; import type { FC } from 'react'; diff --git a/apps/web/src/components/Channel/index.tsx b/apps/web/src/components/Channel/index.tsx index 0d5d7b603c62..8d794e40f580 100644 --- a/apps/web/src/components/Channel/index.tsx +++ b/apps/web/src/components/Channel/index.tsx @@ -1,7 +1,7 @@ import MetaTags from '@components/Common/MetaTags'; import { APP_NAME, CHANNELS_WORKER_URL } from '@hey/data/constants'; import { PAGEVIEW } from '@hey/data/tracking'; -import type { Channel } from '@hey/types/lenster'; +import type { Channel } from '@hey/types/hey'; import { GridItemEight, GridItemFour, GridLayout } from '@hey/ui'; import { Leafwatch } from '@lib/leafwatch'; import { useQuery } from '@tanstack/react-query'; diff --git a/apps/web/src/components/Composer/NewPublication.tsx b/apps/web/src/components/Composer/NewPublication.tsx index 87c2cdbd66d3..108e107e1f91 100644 --- a/apps/web/src/components/Composer/NewPublication.tsx +++ b/apps/web/src/components/Composer/NewPublication.tsx @@ -47,7 +47,7 @@ import { import { useApolloClient } from '@hey/lens/apollo'; import getSignature from '@hey/lib/getSignature'; import type { IGif } from '@hey/types/giphy'; -import type { NewLensterAttachment } from '@hey/types/misc'; +import type { NewAttachment } from '@hey/types/misc'; import { Button, Card, ErrorMessage, Spinner } from '@hey/ui'; import cn from '@hey/ui/cn'; import type { @@ -847,7 +847,7 @@ const NewPublication: FC = ({ publication }) => { }; const setGifAttachment = (gif: IGif) => { - const attachment: NewLensterAttachment = { + const attachment: NewAttachment = { id: uuid(), previewItem: gif.images.original.url, original: { diff --git a/apps/web/src/components/Publication/OpenActions/Snapshot/index.tsx b/apps/web/src/components/Publication/OpenActions/Snapshot/index.tsx index 8e24f5bd0772..8377041e5a7c 100644 --- a/apps/web/src/components/Publication/OpenActions/Snapshot/index.tsx +++ b/apps/web/src/components/Publication/OpenActions/Snapshot/index.tsx @@ -1,4 +1,4 @@ -import { LENSTER_POLLS_SPACE } from '@hey/data/constants'; +import { HEY_POLLS_SPACE } from '@hey/data/constants'; import stopEventPropagation from '@hey/lib/stopEventPropagation'; import type { Proposal, Vote } from '@hey/snapshot'; import { useProposalQuery } from '@hey/snapshot'; @@ -42,7 +42,7 @@ const Snapshot: FC = ({ proposalId }) => { } const { proposal, votes } = data; - const isLensterPoll = proposal?.space?.id === LENSTER_POLLS_SPACE; + const isLensterPoll = proposal?.space?.id === HEY_POLLS_SPACE; if (!proposal) { return null; diff --git a/apps/web/src/components/Shared/Attachments.tsx b/apps/web/src/components/Shared/Attachments.tsx index 7a12cd4ce548..e0713f171587 100644 --- a/apps/web/src/components/Shared/Attachments.tsx +++ b/apps/web/src/components/Shared/Attachments.tsx @@ -14,7 +14,7 @@ import getThumbnailUrl from '@hey/lib/getThumbnailUrl'; import imageKit from '@hey/lib/imageKit'; import sanitizeDStorageUrl from '@hey/lib/sanitizeDStorageUrl'; import stopEventPropagation from '@hey/lib/stopEventPropagation'; -import type { NewLensterAttachment } from '@hey/types/misc'; +import type { NewAttachment } from '@hey/types/misc'; import { Button, Image, LightBox } from '@hey/ui'; import cn from '@hey/ui/cn'; import { Leafwatch } from '@lib/leafwatch'; @@ -104,7 +104,7 @@ const Attachments: FC = ({ <>
{slicedAttachments?.map( - (attachment: NewLensterAttachment & MediaSet, index: number) => { + (attachment: NewAttachment & MediaSet, index: number) => { const type = attachment.original?.mimeType; const url = isNew ? attachment.previewItem diff --git a/apps/web/src/components/Shared/Channel/Join.tsx b/apps/web/src/components/Shared/Channel/Join.tsx index 66dd0370ab5b..958d4643b0e6 100644 --- a/apps/web/src/components/Shared/Channel/Join.tsx +++ b/apps/web/src/components/Shared/Channel/Join.tsx @@ -1,6 +1,6 @@ import { UserPlusIcon } from '@heroicons/react/24/outline'; import { CHANNELS_WORKER_URL } from '@hey/data/constants'; -import type { Channel } from '@hey/types/lenster'; +import type { Channel } from '@hey/types/hey'; import { Button, Modal } from '@hey/ui'; import { t } from '@lingui/macro'; import { useQuery } from '@tanstack/react-query'; diff --git a/apps/web/src/components/Shared/Channel/Mint.tsx b/apps/web/src/components/Shared/Channel/Mint.tsx index b41eb17d541d..83b786e05d49 100644 --- a/apps/web/src/components/Shared/Channel/Mint.tsx +++ b/apps/web/src/components/Shared/Channel/Mint.tsx @@ -3,7 +3,7 @@ import { CurrencyDollarIcon, UserPlusIcon } from '@heroicons/react/24/outline'; import { CheckCircleIcon } from '@heroicons/react/24/solid'; import { ZoraERC721Drop } from '@hey/abis'; import { ADMIN_ADDRESS } from '@hey/data/constants'; -import type { Channel } from '@hey/types/lenster'; +import type { Channel } from '@hey/types/hey'; import { Button, Spinner } from '@hey/ui'; import { t, Trans } from '@lingui/macro'; import Link from 'next/link'; diff --git a/apps/web/src/hooks/useUploadAttachments.tsx b/apps/web/src/hooks/useUploadAttachments.tsx index cf892210568b..83b1884fa6d3 100644 --- a/apps/web/src/hooks/useUploadAttachments.tsx +++ b/apps/web/src/hooks/useUploadAttachments.tsx @@ -1,4 +1,4 @@ -import type { NewLensterAttachment } from '@hey/types/misc'; +import type { NewAttachment } from '@hey/types/misc'; import uploadToIPFS from '@lib/uploadToIPFS'; import { t } from '@lingui/macro'; import { useCallback } from 'react'; @@ -20,27 +20,25 @@ const useUploadAttachments = () => { ); const handleUploadAttachments = useCallback( - async (attachments: any): Promise => { + async (attachments: any): Promise => { setIsUploading(true); const files = Array.from(attachments); const attachmentIds: string[] = []; - const previewAttachments: NewLensterAttachment[] = files.map( - (file: any) => { - const attachmentId = uuid(); - attachmentIds.push(attachmentId); + const previewAttachments: NewAttachment[] = files.map((file: any) => { + const attachmentId = uuid(); + attachmentIds.push(attachmentId); - return { - id: attachmentId, - file: file, - previewItem: URL.createObjectURL(file), - original: { - url: URL.createObjectURL(file), - mimeType: file.type - } - }; - } - ); + return { + id: attachmentId, + file: file, + previewItem: URL.createObjectURL(file), + original: { + url: URL.createObjectURL(file), + mimeType: file.type + } + }; + }); const hasLargeAttachment = files.map((file: any) => { const isImage = file.type.includes('image'); @@ -66,7 +64,7 @@ const useUploadAttachments = () => { }); addAttachments(previewAttachments); - let attachmentsIPFS: NewLensterAttachment[] = []; + let attachmentsIPFS: NewAttachment[] = []; try { if (hasLargeAttachment.includes(false)) { setIsUploading(false); @@ -80,7 +78,7 @@ const useUploadAttachments = () => { ); if (attachmentsUploaded) { attachmentsIPFS = previewAttachments.map( - (attachment: NewLensterAttachment, index: number) => ({ + (attachment: NewAttachment, index: number) => ({ ...attachment, original: { url: attachmentsUploaded[index].original.url, diff --git a/apps/web/src/lib/getAlgorithmicFeed.ts b/apps/web/src/lib/getAlgorithmicFeed.ts index 225c7e36dabb..b79df867d11e 100644 --- a/apps/web/src/lib/getAlgorithmicFeed.ts +++ b/apps/web/src/lib/getAlgorithmicFeed.ts @@ -33,11 +33,11 @@ const getAlgorithmicFeed = async ( offset, profile?.handle ).then((data) => data); - case HomeFeedType.LENSTER_MOSTVIEWED: - case HomeFeedType.LENSTER_MOSTINTERACTED: + case HomeFeedType.HEY_MOSTVIEWED: + case HomeFeedType.HEY_MOSTINTERACTED: return getPublicationIds( - AlgorithmProvider.LENSTER, - feedType.replace('LENSTER_', '').toLowerCase(), + AlgorithmProvider.HEY, + feedType.replace('HEY_', '').toLowerCase(), limit, offset ).then((data) => data); diff --git a/apps/web/src/lib/getChannelByTag.ts b/apps/web/src/lib/getChannelByTag.ts index 9da731827b15..9b7b1d5eeaa0 100644 --- a/apps/web/src/lib/getChannelByTag.ts +++ b/apps/web/src/lib/getChannelByTag.ts @@ -1,4 +1,4 @@ -import type { Channel } from '@hey/types/lenster'; +import type { Channel } from '@hey/types/hey'; import { featuredChannels } from 'src/store/app'; const getChannelByTag = (tags: string[]): Channel | undefined => { diff --git a/apps/web/src/lib/uploadToIPFS.ts b/apps/web/src/lib/uploadToIPFS.ts index 06a45a380fd0..1da920567e1c 100644 --- a/apps/web/src/lib/uploadToIPFS.ts +++ b/apps/web/src/lib/uploadToIPFS.ts @@ -65,7 +65,7 @@ const uploadToIPFS = async ( files.map(async (_: any, i: number) => { const file = data[i]; const params = { - Bucket: S3_BUCKET.LENSTER_MEDIA, + Bucket: S3_BUCKET.HEY_MEDIA, Key: uuid(), Body: file, ContentType: file.type diff --git a/apps/web/src/store/app.ts b/apps/web/src/store/app.ts index 916816174abe..c99187bea5ff 100644 --- a/apps/web/src/store/app.ts +++ b/apps/web/src/store/app.ts @@ -1,6 +1,6 @@ import { Localstorage } from '@hey/data/storage'; import type { Profile } from '@hey/lens'; -import type { Channel } from '@hey/types/lenster'; +import type { Channel } from '@hey/types/hey'; import { create } from 'zustand'; import { persist } from 'zustand/middleware'; diff --git a/apps/web/src/store/publication.ts b/apps/web/src/store/publication.ts index 425743685440..f576d8a01f27 100644 --- a/apps/web/src/store/publication.ts +++ b/apps/web/src/store/publication.ts @@ -1,5 +1,5 @@ import type { Publication } from '@hey/lens'; -import type { NewLensterAttachment } from '@hey/types/misc'; +import type { NewAttachment } from '@hey/types/misc'; import { create } from 'zustand'; interface PublicationState { @@ -19,10 +19,10 @@ interface PublicationState { cover: string; coverMimeType: string; }) => void; - attachments: NewLensterAttachment[]; - setAttachments: (attachments: NewLensterAttachment[]) => void; - addAttachments: (attachments: NewLensterAttachment[]) => void; - updateAttachments: (attachments: NewLensterAttachment[]) => void; + attachments: NewAttachment[]; + setAttachments: (attachments: NewAttachment[]) => void; + addAttachments: (attachments: NewAttachment[]) => void; + updateAttachments: (attachments: NewAttachment[]) => void; removeAttachments: (ids: string[]) => void; videoThumbnail: { url?: string; diff --git a/packages/data/algorithms.ts b/packages/data/algorithms.ts index f2332d212907..dc4a9488051a 100644 --- a/packages/data/algorithms.ts +++ b/packages/data/algorithms.ts @@ -11,7 +11,7 @@ export const algorithms: { }[] = [ { name: 'Most viewed', - feedType: HomeFeedType.LENSTER_MOSTVIEWED, + feedType: HomeFeedType.HEY_MOSTVIEWED, description: 'Most viewed posts sorted by the number of views in the last 24 hours in Lenster.', image: `${STATIC_IMAGES_URL}/algorithms/lenster-mostviewed.png`, @@ -19,7 +19,7 @@ export const algorithms: { }, { name: 'Most interacted', - feedType: HomeFeedType.LENSTER_MOSTINTERACTED, + feedType: HomeFeedType.HEY_MOSTINTERACTED, description: 'Most interacted posts sorted by the number of interactions in the last 24 hours in Lenster.', image: `${STATIC_IMAGES_URL}/algorithms/lenster-mostinteracted.png`, diff --git a/packages/data/constants.ts b/packages/data/constants.ts index c6c447eae64f..7d69e365e452 100644 --- a/packages/data/constants.ts +++ b/packages/data/constants.ts @@ -22,7 +22,7 @@ export const XMTP_ENV = IS_MAINNET ? 'production' : 'dev'; export const XMTP_PREFIX = 'lens.dev/dm'; // Snapshot -export const LENSTER_POLLS_SPACE = 'polls.lenster.xyz'; +export const HEY_POLLS_SPACE = 'polls.lenster.xyz'; export const SNAPSHOT_HUB_URL = IS_MAINNET ? 'https://hub.snapshot.org' : 'https://testnet.snapshot.org'; @@ -159,5 +159,5 @@ export const ATTACHMENT = 'tr:w-1000'; // S3 bucket export const S3_BUCKET = { - LENSTER_MEDIA: 'lenster-media' + HEY_MEDIA: 'hey-media' }; diff --git a/packages/data/enums.ts b/packages/data/enums.ts index 5711d5872221..fb7d07572074 100644 --- a/packages/data/enums.ts +++ b/packages/data/enums.ts @@ -8,11 +8,11 @@ export enum HomeFeedType { K3L_POPULAR = 'K3L_POPULAR', K3L_CROWDSOURCED = 'K3L_CROWDSOURCED', K3L_FOLLOWING = 'K3L_FOLLOWING', - LENSTER_MOSTVIEWED = 'LENSTER_MOSTVIEWED', - LENSTER_MOSTINTERACTED = 'LENSTER_MOSTINTERACTED' + HEY_MOSTVIEWED = 'HEY_MOSTVIEWED', + HEY_MOSTINTERACTED = 'HEY_MOSTINTERACTED' } export const AlgorithmProvider = { K3L: 'k3l', - LENSTER: 'lenster' + HEY: 'hey' }; diff --git a/packages/types/lenster.d.ts b/packages/types/hey.d.ts similarity index 100% rename from packages/types/lenster.d.ts rename to packages/types/hey.d.ts diff --git a/packages/types/misc.d.ts b/packages/types/misc.d.ts index 40ff7d5c6b1f..27891c36c478 100644 --- a/packages/types/misc.d.ts +++ b/packages/types/misc.d.ts @@ -2,7 +2,7 @@ import type { MediaSet } from '@hey/lens'; export interface MediaSetWithoutOnChain extends Omit {} -export interface NewLensterAttachment extends MediaSetWithoutOnChain { +export interface NewAttachment extends MediaSetWithoutOnChain { id: string; file?: File; previewItem: string; diff --git a/packages/workers/feeds/src/handlers/getPublicationIds.ts b/packages/workers/feeds/src/handlers/getPublicationIds.ts index 54effaf3349b..d8f0df500523 100644 --- a/packages/workers/feeds/src/handlers/getPublicationIds.ts +++ b/packages/workers/feeds/src/handlers/getPublicationIds.ts @@ -1,8 +1,8 @@ import { AlgorithmProvider } from '@hey/data/enums'; import response from '@hey/lib/response'; +import heyFeed from '../providers/hey/heyFeed'; import k3lFeed from '../providers/k3l/k3lFeed'; -import lensterFeed from '../providers/lenster/lensterFeed'; import type { WorkerRequest } from '../types'; export default async (request: WorkerRequest) => { @@ -25,8 +25,8 @@ export default async (request: WorkerRequest) => { case AlgorithmProvider.K3L: ids = await k3lFeed(strategy, profile, limit, offset); break; - case AlgorithmProvider.LENSTER: - ids = await lensterFeed(strategy, limit, offset, request.env); + case AlgorithmProvider.HEY: + ids = await heyFeed(strategy, limit, offset, request.env); break; default: return response({ success: false, message: 'Invalid provider' }); diff --git a/packages/workers/feeds/src/providers/lenster/README.md b/packages/workers/feeds/src/providers/hey/README.md similarity index 100% rename from packages/workers/feeds/src/providers/lenster/README.md rename to packages/workers/feeds/src/providers/hey/README.md diff --git a/packages/workers/feeds/src/providers/lenster/algorithms/lensterMostInteracted.ts b/packages/workers/feeds/src/providers/hey/algorithms/heyMostInteracted.ts similarity index 96% rename from packages/workers/feeds/src/providers/lenster/algorithms/lensterMostInteracted.ts rename to packages/workers/feeds/src/providers/hey/algorithms/heyMostInteracted.ts index e1438675091e..c100822b5d91 100644 --- a/packages/workers/feeds/src/providers/lenster/algorithms/lensterMostInteracted.ts +++ b/packages/workers/feeds/src/providers/hey/algorithms/heyMostInteracted.ts @@ -28,7 +28,7 @@ const generateWeightedCaseStatement = () => { .join(' '); }; -const lensterMostInteracted = async ( +const heyMostInteracted = async ( limit: number, offset: number, env: Env @@ -71,4 +71,4 @@ const lensterMostInteracted = async ( } }; -export default lensterMostInteracted; +export default heyMostInteracted; diff --git a/packages/workers/feeds/src/providers/lenster/algorithms/lensterMostViewed.ts b/packages/workers/feeds/src/providers/hey/algorithms/heyMostViewed.ts similarity index 94% rename from packages/workers/feeds/src/providers/lenster/algorithms/lensterMostViewed.ts rename to packages/workers/feeds/src/providers/hey/algorithms/heyMostViewed.ts index 0c3c0a9d796f..95113b335cc1 100644 --- a/packages/workers/feeds/src/providers/lenster/algorithms/lensterMostViewed.ts +++ b/packages/workers/feeds/src/providers/hey/algorithms/heyMostViewed.ts @@ -6,7 +6,7 @@ import removeParamsFromString from '../../../helpers/removeParamsFromString'; import type { Env } from '../../../types'; import clickhouseQuery from '../clickhouseQuery'; -const lensterMostViewed = async ( +const heyMostViewed = async ( limit: number, offset: number, env: Env @@ -48,4 +48,4 @@ const lensterMostViewed = async ( } }; -export default lensterMostViewed; +export default heyMostViewed; diff --git a/packages/workers/feeds/src/providers/lenster/clickhouseQuery.ts b/packages/workers/feeds/src/providers/hey/clickhouseQuery.ts similarity index 100% rename from packages/workers/feeds/src/providers/lenster/clickhouseQuery.ts rename to packages/workers/feeds/src/providers/hey/clickhouseQuery.ts diff --git a/packages/workers/feeds/src/providers/lenster/docs/MostInteracted.md b/packages/workers/feeds/src/providers/hey/docs/MostInteracted.md similarity index 100% rename from packages/workers/feeds/src/providers/lenster/docs/MostInteracted.md rename to packages/workers/feeds/src/providers/hey/docs/MostInteracted.md diff --git a/packages/workers/feeds/src/providers/lenster/docs/MostViewed.md b/packages/workers/feeds/src/providers/hey/docs/MostViewed.md similarity index 100% rename from packages/workers/feeds/src/providers/lenster/docs/MostViewed.md rename to packages/workers/feeds/src/providers/hey/docs/MostViewed.md diff --git a/packages/workers/feeds/src/providers/hey/heyFeed.ts b/packages/workers/feeds/src/providers/hey/heyFeed.ts new file mode 100644 index 000000000000..5756c55c2f1d --- /dev/null +++ b/packages/workers/feeds/src/providers/hey/heyFeed.ts @@ -0,0 +1,21 @@ +import type { Env } from '../../types'; +import heyMostInteracted from './algorithms/heyMostInteracted'; +import heyMostViewed from './algorithms/heyMostViewed'; + +const heyFeed = async ( + strategy: string, + limit: number, + offset: number, + env: Env +) => { + switch (strategy) { + case 'mostviewed': + return await heyMostViewed(limit, offset, env); + case 'mostinteracted': + return await heyMostInteracted(limit, offset, env); + default: + return []; + } +}; + +export default heyFeed; diff --git a/packages/workers/feeds/src/providers/lenster/lensterFeed.ts b/packages/workers/feeds/src/providers/lenster/lensterFeed.ts deleted file mode 100644 index ab8a282311b1..000000000000 --- a/packages/workers/feeds/src/providers/lenster/lensterFeed.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { Env } from '../../types'; -import lensterMostInteracted from './algorithms/lensterMostInteracted'; -import lensterMostViewed from './algorithms/lensterMostViewed'; - -const lensterFeed = async ( - strategy: string, - limit: number, - offset: number, - env: Env -) => { - switch (strategy) { - case 'mostviewed': - return await lensterMostViewed(limit, offset, env); - case 'mostinteracted': - return await lensterMostInteracted(limit, offset, env); - default: - return []; - } -}; - -export default lensterFeed; diff --git a/packages/workers/snapshot-relay/src/handlers/createPoll.ts b/packages/workers/snapshot-relay/src/handlers/createPoll.ts index 54a71d07435e..e2b0ece610a6 100644 --- a/packages/workers/snapshot-relay/src/handlers/createPoll.ts +++ b/packages/workers/snapshot-relay/src/handlers/createPoll.ts @@ -1,5 +1,5 @@ import { - LENSTER_POLLS_SPACE, + HEY_POLLS_SPACE, MAINNET_SNAPSHOT_SEQUNECER_URL, MAINNET_SNAPSHOT_URL, TESTNET_SNAPSHOT_SEQUNECER_URL, @@ -93,7 +93,7 @@ export default async (request: WorkerRequest) => { ] }, message: { - space: LENSTER_POLLS_SPACE, + space: HEY_POLLS_SPACE, type: 'single-choice', title, body: description, @@ -132,7 +132,7 @@ export default async (request: WorkerRequest) => { return response({ success: true, - snapshotUrl: `${snapshotUrl}/#/${LENSTER_POLLS_SPACE}/proposal/${snapshotResponse.id}` + snapshotUrl: `${snapshotUrl}/#/${HEY_POLLS_SPACE}/proposal/${snapshotResponse.id}` }); } catch (error) { throw error;