diff --git a/src/mappings/content/channel.ts b/src/mappings/content/channel.ts index 41be48cb5..a5626def4 100644 --- a/src/mappings/content/channel.ts +++ b/src/mappings/content/channel.ts @@ -1,6 +1,5 @@ import { Channel, - ChannelFollow, Event, Membership, MetaprotocolTransactionResultFailed, @@ -39,10 +38,6 @@ export async function processChannelCreatedEvent({ ], }, }: EventHandlerContext<'Content.ChannelCreated'>) { - const followsNum = await overlay - .getEm() - .getRepository(ChannelFollow) - .countBy({ channelId: channelId.toString() }) // create entity const channel = overlay.getRepository(Channel).new({ id: channelId.toString(), @@ -53,7 +48,7 @@ export async function processChannelCreatedEvent({ ownerMemberId: owner.__kind === 'Member' ? owner.value.toString() : undefined, rewardAccount: toAddress(rewardAccount), channelStateBloatBond: channelStateBloatBond.amount, - followsNum, + followsNum: 0, videoViewsNum: 0, totalVideosCreated: 0, }) diff --git a/src/utils/offchainState.ts b/src/utils/offchainState.ts index 788fe48b4..e75d429db 100644 --- a/src/utils/offchainState.ts +++ b/src/utils/offchainState.ts @@ -15,7 +15,7 @@ const exportedStateMap = { NftFeaturingRequest: true, VideoHero: true, VideoFeaturedInCategory: true, - Channel: ['is_excluded', 'video_views_num'], + Channel: ['is_excluded', 'video_views_num', 'follows_num'], Video: ['is_excluded', 'views_num'], Comment: ['is_excluded'], OwnedNft: ['is_featured'],