Skip to content

Commit

Permalink
Migrate to Lens v3
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoginth committed Dec 6, 2024
1 parent ef88d93 commit 6252a31
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions apps/web/src/hooks/useCreatePost.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import selfFundedTransactionData from "@hey/helpers/selfFundedTransactionData";
import sponsoredTransactionData from "@hey/helpers/sponsoredTransactionData";
import {
type CreatePostRequest,
type Post,
type PostResponse,
useCreatePostMutation
Expand Down Expand Up @@ -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 }));
Expand Down Expand Up @@ -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 };
};

Expand Down

0 comments on commit 6252a31

Please sign in to comment.