From 6252a31d2aa578be65f5a7dc0a6da62f39e3af81 Mon Sep 17 00:00:00 2001 From: Yoginth Date: Fri, 6 Dec 2024 10:12:50 +0530 Subject: [PATCH] Migrate to Lens v3 --- apps/web/src/hooks/useCreatePost.tsx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/apps/web/src/hooks/useCreatePost.tsx b/apps/web/src/hooks/useCreatePost.tsx index f5a414a4937e..97d4438bae7d 100644 --- a/apps/web/src/hooks/useCreatePost.tsx +++ b/apps/web/src/hooks/useCreatePost.tsx @@ -1,7 +1,6 @@ import selfFundedTransactionData from "@hey/helpers/selfFundedTransactionData"; import sponsoredTransactionData from "@hey/helpers/sponsoredTransactionData"; import { - type CreatePostRequest, type Post, type PostResponse, useCreatePostMutation @@ -52,7 +51,7 @@ const useCreatePost = ({ }; // Onchain mutations - const [post] = useCreatePostMutation({ + const [createPost] = useCreatePostMutation({ onCompleted: async ({ post }) => { if (post.__typename === "PostResponse") { addTransaction(generateOptimisticPublication({ txHash: post.hash })); @@ -88,13 +87,6 @@ const useCreatePost = ({ onError }); - const createPost = async (request: CreatePostRequest) => { - const { data } = await post({ variables: { request } }); - if (data?.post?.__typename === "SelfFundedTransactionRequest") { - // TODO: Lens v3 Handle self-funded transaction - } - }; - return { createPost }; };