Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions hooks/useAddToNetwork.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Fathom from "fathom-client";
import { useMutation, QueryClient } from "@tanstack/react-query";
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { FATHOM_EVENTS_ID, FATHOM_DROPDOWN_EVENTS_ID, FATHOM_NO_EVENTS_ID, CHAINS_MONITOR } from "./useAnalytics";
import { connectWallet } from "./useConnect";

Expand Down Expand Up @@ -53,7 +53,7 @@ export async function addToNetwork({ address, chain, rpc }) {
}

export default function useAddToNetwork() {
const queryClient = new QueryClient();
const queryClient = useQueryClient();

return useMutation(addToNetwork, {
onSettled: () => {
Expand Down
4 changes: 2 additions & 2 deletions hooks/useConnect.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useMutation, QueryClient } from "@tanstack/react-query";
import { useMutation, useQueryClient } from "@tanstack/react-query";

export async function connectWallet() {
try {
Expand All @@ -20,7 +20,7 @@ export async function connectWallet() {
}

export default function useConnect() {
const queryClient = new QueryClient();
const queryClient = useQueryClient();

return useMutation(() => connectWallet(), {
onSettled: () => {
Expand Down