From 5010d87575a512e595936a6a67f915487a260cf4 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Wed, 11 Feb 2026 13:02:18 +0200 Subject: [PATCH] fix mutationFn --- src/screens/Profile/components/GermButton.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/screens/Profile/components/GermButton.tsx b/src/screens/Profile/components/GermButton.tsx index 3fc9bc963f..cdd115ac26 100644 --- a/src/screens/Profile/components/GermButton.tsx +++ b/src/screens/Profile/components/GermButton.tsx @@ -99,7 +99,7 @@ function GermSelfButton({did}: {did: string}) { const queryClient = useQueryClient() const {mutate: deleteDeclaration, isPending} = useMutation({ - onMutate: async () => { + mutationFn: async () => { const previousRecord = await agent.com.germnetwork.declaration .get({ repo: did, @@ -117,7 +117,7 @@ function GermSelfButton({did}: {did: string}) { return previousRecord }, - onSuccess: (_data, _variables, previousRecord) => { + onSuccess: previousRecord => { async function undo() { if (!previousRecord) return await agent.com.germnetwork.declaration.put(