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(