// not used
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import React, { type ReactNode } from "react";
import { http, WagmiProvider, createConfig } from "wagmi";
import { mainnet, optimism, polygon } from "wagmi/chains";

const config = createConfig({
	chains: [polygon, optimism, mainnet],
	transports: {
		[polygon.id]: http(),
		[optimism.id]: http(),
		[mainnet.id]: http(),
	},
});

const queryClient = new QueryClient();

export const WalletProvider = ({ children }: { children: ReactNode }) => {
	return (
		<WagmiProvider config={config}>
			<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
		</WagmiProvider>
	);
};
