) {
- event.preventDefault();
- await toast.promise(
- fetch("/api/contact", {
- method: "POST",
- body: new FormData(event.currentTarget),
- }),
- {
- loading: "Sending message...",
- success: "Message sent!",
- error: (
-
- Something went wrong!
-
- Please try again later, or contact us directly at{" "}
-
- support@skip.money
-
-
- ),
- },
- );
-}
diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx
deleted file mode 100644
index b7a7e52f..00000000
--- a/src/components/Footer.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-import { ChatBubbleOvalLeftIcon as ContactIcon } from "@heroicons/react/16/solid";
-import { useQuery } from "@tanstack/react-query";
-
-import { useDisclosureKey } from "@/context/disclosures";
-import { cn } from "@/utils/ui";
-
-export function Footer() {
- const [isOpen, { open }] = useDisclosureKey("contactDialog");
-
- const { data: isShown = false } = useQuery({
- queryKey: ["USE_CONTACT_FORM_VISIBILITY"],
- queryFn: async () => {
- const response = await fetch("/api/contact", { method: "HEAD" });
- return response.ok;
- },
- placeholderData: false,
- });
-
- return (
-
- );
-}
diff --git a/src/components/RouteDisplay/__test__/make-actions.test.tsx b/src/components/RouteDisplay/__test__/make-actions.test.tsx
index 57b7647f..3c818529 100644
--- a/src/components/RouteDisplay/__test__/make-actions.test.tsx
+++ b/src/components/RouteDisplay/__test__/make-actions.test.tsx
@@ -103,16 +103,16 @@ const makeActionsTest = async (_route: RouteArgs) => {
test("make-actions: Cosmoshub ATOM -> Akash AKT", async () => {
await makeActionsTest(cosmosHubAtomToAkashAKT);
-});
+}, 30000);
test("make-actions: Cosmoshub ATOM to Akash ATOM", async () => {
await makeActionsTest(cosmoshubATOMToAkashATOM);
-});
+}, 30000);
test("make-actions: Noble USDC to Ethereum USDC", async () => {
await makeActionsTest(nobleUSDCToEthereumUSDC);
-});
+}, 30000);
test("make-actions: Cosmoshub ATOM to Arbitrum ARB", async () => {
await makeActionsTest(cosmoshubATOMToArbitrumARB);
-});
+}, 30000);
diff --git a/src/components/RouteDisplay/__test__/make-step.test.tsx b/src/components/RouteDisplay/__test__/make-step.test.tsx
index 09aa37ba..c7040e08 100644
--- a/src/components/RouteDisplay/__test__/make-step.test.tsx
+++ b/src/components/RouteDisplay/__test__/make-step.test.tsx
@@ -52,9 +52,8 @@ test("make-step: Noble USDC to Injective INJ", async () => {
wrapper: AllTheProviders,
},
);
-
await waitFor(() => expect(result.current.isLoading).toBeFalsy(), {
- timeout: 10000,
+ timeout: 120000,
});
actions.forEach((action, i) => {
@@ -68,4 +67,4 @@ test("make-step: Noble USDC to Injective INJ", async () => {
expect(operationTypeIndex).toBeDefined();
expect(explorerLink).toBeDefined();
});
-});
+}, 120000);
diff --git a/src/components/SwapWidget/SwapWidget.tsx b/src/components/SwapWidget/SwapWidget.tsx
index 85d44c23..1e0c9b69 100644
--- a/src/components/SwapWidget/SwapWidget.tsx
+++ b/src/components/SwapWidget/SwapWidget.tsx
@@ -11,7 +11,6 @@ import { cn } from "@/utils/ui";
import { AdaptiveLink } from "../AdaptiveLink";
import AssetInput from "../AssetInput";
import { ConnectedWalletButton } from "../ConnectedWalletButton";
-import { ContactDialog } from "../ContactDialog";
import { HistoryButton } from "../HistoryButton";
import { HistoryDialog } from "../HistoryDialog";
import { JsonDialog } from "../JsonDialog";
@@ -297,7 +296,6 @@ export function SwapWidget() {
)}
-
diff --git a/src/components/SwapWidget/useSwapWidget.ts b/src/components/SwapWidget/useSwapWidget.ts
index 66828bcf..c5307a2e 100644
--- a/src/components/SwapWidget/useSwapWidget.ts
+++ b/src/components/SwapWidget/useSwapWidget.ts
@@ -8,8 +8,7 @@ import { formatUnits } from "viem";
import {
useAccount as useWagmiAccount,
useDisconnect as useWagmiDisconnect,
- useNetwork as useWagmiNetwork,
- useSwitchNetwork as useWagmiSwitchNetwork,
+ useSwitchChain as useWagmiSwitchNetwork,
} from "wagmi";
import { createJSONStorage, persist, subscribeWithSelector } from "zustand/middleware";
import { shallow } from "zustand/shallow";
@@ -51,11 +50,12 @@ export function useSwapWidget() {
const srcAccount = useAccount("source");
const { getWalletRepo } = useCosmosManager();
- const { connector } = useWagmiAccount();
- const { chain: evmChain } = useWagmiNetwork();
- const { switchNetworkAsync } = useWagmiSwitchNetwork({
- onError: (error) => {
- toast.error(`Network switch error: ${error.message}`);
+ const { connector, chain: evmChain } = useWagmiAccount();
+ const { switchChainAsync: switchNetworkAsync } = useWagmiSwitchNetwork({
+ mutation: {
+ onError: (error) => {
+ toast.error(`Network switch error: ${error.message}`);
+ },
},
});
const { disconnect } = useWagmiDisconnect();
@@ -631,7 +631,7 @@ export function useSwapWidget() {
if (evmChain && connector) {
try {
if (switchNetworkAsync && evmChain.id !== +srcChain.chainID) {
- await switchNetworkAsync(+srcChain.chainID);
+ await switchNetworkAsync({ chainId: +srcChain.chainID });
}
trackWallet.track("source", srcChain.chainID, connector.id, srcChain.chainType);
} catch (error) {
@@ -693,7 +693,7 @@ export function useSwapWidget() {
if (evmChain && connector) {
try {
if (switchNetworkAsync && evmChain.id !== +dstChain.chainID && srcChain && srcChain.chainType !== "evm") {
- await switchNetworkAsync(+dstChain.chainID);
+ await switchNetworkAsync({ chainId: +dstChain.chainID });
}
trackWallet.track("destination", dstChain.chainID, connector.id, dstChain.chainType);
} catch (error) {
diff --git a/src/components/WalletModal/WalletListItem.tsx b/src/components/WalletModal/WalletListItem.tsx
index 7333cca5..0b74ec5f 100644
--- a/src/components/WalletModal/WalletListItem.tsx
+++ b/src/components/WalletModal/WalletListItem.tsx
@@ -1,7 +1,5 @@
import { useWallet, useWalletClient as useCosmosWalletClient } from "@cosmos-kit/react";
import { ComponentProps, useEffect, useMemo } from "react";
-import toast from "react-hot-toast";
-import { useConnect } from "wagmi";
import { create } from "zustand";
import { MergedWalletClient } from "@/lib/cosmos-kit";
@@ -80,35 +78,9 @@ const EvmWalletListItem = ({
}: ComponentProps<"div"> & {
walletName: string;
}) => {
- const { connectors } = useConnect({
- onError: (err) => {
- toast.error(
-
- Failed to connect!
-
- {err.name}: {err.message}
-
,
- );
- },
- });
-
- const connector = useMemo(() => {
- return connectors.find((c) => c.id === walletName);
- }, [connectors, walletName]);
-
- const show = useMemo(() => {
- return connector?.ready ?? false;
- }, [connector?.ready]);
-
useEffect(() => {
- const unregister = () => {
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
- useStore.setState(({ [walletName]: _, ...latest }) => latest, true);
- };
- if (show) useStore.setState({ [walletName]: true });
- else unregister();
- return unregister;
- }, [show, walletName]);
+ useStore.setState({ [walletName]: true });
+ }, [walletName]);
- return {show ? children : null}
;
+ return {children}
;
};
diff --git a/src/components/WalletModal/WalletModal.tsx b/src/components/WalletModal/WalletModal.tsx
index 51ca1373..ed9430d2 100644
--- a/src/components/WalletModal/WalletModal.tsx
+++ b/src/components/WalletModal/WalletModal.tsx
@@ -8,7 +8,6 @@ import { useAccount, useConnect, useDisconnect } from "wagmi";
import { chainIdToName } from "@/chains/types";
import { DialogContent } from "@/components/Dialog";
-import { EVM_WALLET_LOGOS, INJECTED_EVM_WALLET_LOGOS } from "@/constants/wagmi";
import { trackWallet } from "@/context/track-wallet";
import { useChainByID } from "@/hooks/useChains";
import { cn } from "@/utils/ui";
@@ -156,14 +155,16 @@ function WalletModalWithContext() {
const { chainID, context } = useWalletModal();
const { disconnectAsync } = useDisconnect();
const { connectors, connectAsync } = useConnect({
- onError: (err) => {
- toast.error(
-
- Failed to connect!
-
- {err.name}: {err.message}
-
,
- );
+ mutation: {
+ onError: (err) => {
+ toast.error(
+
+ Failed to connect!
+
+ {err.name}: {err.message}
+
,
+ );
+ },
},
});
const { getWalletRepo } = useManager();
@@ -212,14 +213,11 @@ function WalletModalWithContext() {
continue;
}
- const logoUrl =
- INJECTED_EVM_WALLET_LOGOS[connector.name] || EVM_WALLET_LOGOS[connector.id] || EVM_WALLET_LOGOS.injected;
-
const minimalWallet: MinimalWallet = {
walletName: connector.id,
walletPrettyName: connector.name,
walletInfo: {
- logo: logoUrl,
+ logo: connector.icon,
},
connect: async () => {
if (connector.id === currentConnector?.id) return;
diff --git a/src/constants/wagmi.ts b/src/constants/wagmi.ts
index 0b08b057..f710bb8c 100644
--- a/src/constants/wagmi.ts
+++ b/src/constants/wagmi.ts
@@ -17,19 +17,6 @@ import {
polygonMumbai,
} from "wagmi/chains";
-export const EVM_WALLET_LOGOS: Record = {
- safe: "https://raw.githubusercontent.com/rainbow-me/rainbowkit/6b460fcba954e155828e03f46228ee88a171a83b/packages/rainbowkit/src/wallets/walletConnectors/safeWallet/safeWallet.svg",
- walletConnect: `https://raw.githubusercontent.com/rainbow-me/rainbowkit/6b460fcba954e155828e03f46228ee88a171a83b/packages/rainbowkit/src/wallets/walletConnectors/walletConnectWallet/walletConnectWallet.svg`,
- coinbaseWallet: `https://raw.githubusercontent.com/rainbow-me/rainbowkit/6b460fcba954e155828e03f46228ee88a171a83b/packages/rainbowkit/src/wallets/walletConnectors/coinbaseWallet/coinbaseWallet.svg`,
- metaMask: "/metamask-logo.svg",
- injected: `https://raw.githubusercontent.com/rainbow-me/rainbowkit/6b460fcba954e155828e03f46228ee88a171a83b/packages/rainbowkit/src/wallets/walletConnectors/injectedWallet/injectedWallet.svg`,
-};
-
-export const INJECTED_EVM_WALLET_LOGOS: Record = {
- "OKX Wallet": `https://raw.githubusercontent.com/rainbow-me/rainbowkit/6b460fcba954e155828e03f46228ee88a171a83b/packages/rainbowkit/src/wallets/walletConnectors/okxWallet/okxWallet.svg`,
- Rainbow: `https://raw.githubusercontent.com/rainbow-me/rainbow/develop/src/assets/rainbow-icon-circle.png`,
-};
-
export const EVM_CHAINS: Chain[] = [
mainnet,
arbitrum,
diff --git a/src/context/disclosures.ts b/src/context/disclosures.ts
index b5f2cd54..4fafec55 100644
--- a/src/context/disclosures.ts
+++ b/src/context/disclosures.ts
@@ -3,7 +3,6 @@ import { createJSONStorage, persist } from "zustand/middleware";
const defaultValues = {
confirmSwapDialog: false,
- contactDialog: false,
historyDialog: false,
priceImpactDialog: false,
settingsDialog: false,
diff --git a/src/hooks/useAccount.ts b/src/hooks/useAccount.ts
index 6e16f871..a29463da 100644
--- a/src/hooks/useAccount.ts
+++ b/src/hooks/useAccount.ts
@@ -4,7 +4,6 @@ import { useQuery } from "@tanstack/react-query";
import { useMemo } from "react";
import { useAccount as useWagmiAccount } from "wagmi";
-import { EVM_WALLET_LOGOS, INJECTED_EVM_WALLET_LOGOS } from "@/constants/wagmi";
import { trackWallet, TrackWalletCtx, useTrackWallet } from "@/context/track-wallet";
import { useChainByID } from "@/hooks/useChains";
import { isReadyToCheckLedger, isWalletClientUsingLedger } from "@/utils/wallet";
@@ -40,7 +39,7 @@ export function useAccount(context: TrackWalletCtx) {
{ context, cosmosWallet: cosmosWallet?.walletName, address: cosmosWallet?.address, chainID: chain?.chainID },
],
queryFn: () => {
- if (!cosmosWallet?.client || !chain) return;
+ if (!cosmosWallet?.client || !chain) return null;
return getIsLedger(cosmosWallet.client, chain.chainID);
},
enabled:
@@ -91,10 +90,7 @@ export function useAccount(context: TrackWalletCtx) {
walletName: wagmiAccount.connector.id,
walletPrettyName: wagmiAccount.connector.name,
walletInfo: {
- logo:
- wagmiAccount.connector.id === "injected"
- ? INJECTED_EVM_WALLET_LOGOS[wagmiAccount.connector.name]
- : EVM_WALLET_LOGOS[wagmiAccount.connector.id],
+ logo: wagmiAccount.connector.icon,
},
}
: undefined,
diff --git a/src/hooks/useBalancesByChain.ts b/src/hooks/useBalancesByChain.ts
index 8ef551a5..3861a677 100644
--- a/src/hooks/useBalancesByChain.ts
+++ b/src/hooks/useBalancesByChain.ts
@@ -1,8 +1,9 @@
import { Asset, SkipRouter } from "@skip-router/core";
import { useQuery } from "@tanstack/react-query";
-import { erc20ABI, PublicClient, usePublicClient } from "wagmi";
+import { createPublicClient, erc20Abi, http, PublicClient } from "viem";
import { multicall3ABI } from "@/constants/abis";
+import { EVM_CHAINS } from "@/constants/wagmi";
import { Chain } from "@/hooks/useChains";
import { useSkipClient } from "@/solve";
import { getCosmWasmClientForChainID, getStargateClientForChainID } from "@/utils/clients";
@@ -15,9 +16,9 @@ interface Args {
}
export function useBalancesByChain({ address, chain, assets, enabled = true }: Args) {
- const publicClient = usePublicClient({
- chainId: chain?.chainType === "evm" ? parseInt(chain.chainID) : undefined,
- });
+ // const publicClient = usePublicClient({
+ // chainId: chain?.chainType === "evm" ? parseInt(chain.chainID) : undefined,
+ // });
const skipClient = useSkipClient();
@@ -29,6 +30,10 @@ export function useBalancesByChain({ address, chain, assets, enabled = true }: A
}
if (chain.chainType === "evm") {
+ const publicClient = createPublicClient({
+ chain: EVM_CHAINS.find((i) => i.id === Number(chain.chainID)),
+ transport: http(),
+ });
return getEvmChainBalances(skipClient, publicClient, address, chain.chainID);
}
@@ -93,7 +98,7 @@ export async function getEvmChainBalances(
contracts: chainAssets.map((asset) => {
if (!asset.tokenContract) {
return {
- address: "0xcA11bde05977b3631167028862bE2a173976CA11",
+ address: "0xcA11bde05977b3631167028862bE2a173976CA11" as `0x${string}`,
abi: multicall3ABI,
functionName: "getEthBalance",
args: [address as `0x${string}`],
@@ -102,13 +107,12 @@ export async function getEvmChainBalances(
return {
address: asset.tokenContract as `0x${string}`,
- abi: erc20ABI,
+ abi: erc20Abi,
functionName: "balanceOf",
args: [address as `0x${string}`],
};
}),
});
-
return chainAssets.reduce>(
(acc, asset, i) => ({
...acc,
diff --git a/src/layouts/default.tsx b/src/layouts/default.tsx
index b8e07976..f301d3a8 100644
--- a/src/layouts/default.tsx
+++ b/src/layouts/default.tsx
@@ -1,7 +1,6 @@
import { ReactNode } from "react";
import { Toaster } from "react-hot-toast";
-import { Footer } from "@/components/Footer";
import Header from "@/components/Header";
import { Help } from "@/components/Help";
import SkipBanner from "@/components/SkipBanner";
@@ -17,7 +16,6 @@ export function DefaultLayout({ children }: { children: ReactNode }) {
{children}
-
diff --git a/src/lib/cosmos-kit.ts b/src/lib/cosmos-kit.ts
index ac50976a..222b163a 100644
--- a/src/lib/cosmos-kit.ts
+++ b/src/lib/cosmos-kit.ts
@@ -1,7 +1,7 @@
import { WalletClient } from "@cosmos-kit/core";
-import { wallets as cosmostation } from "@cosmos-kit/cosmostation";
-import { wallets as keplr } from "@cosmos-kit/keplr";
-import { wallets as leap } from "@cosmos-kit/leap";
+import { wallets as cosmostation } from "@cosmos-kit/cosmostation-extension";
+import { wallets as keplr } from "@cosmos-kit/keplr-extension";
+import { wallets as leap } from "@cosmos-kit/leap-extension";
import { wallets as okxwallet } from "@cosmos-kit/okxwallet";
import { wallets as station } from "@cosmos-kit/station";
import { wallets as vectis } from "@cosmos-kit/vectis";
diff --git a/src/lib/wagmi.ts b/src/lib/wagmi.ts
index b0ca9a44..c546043e 100644
--- a/src/lib/wagmi.ts
+++ b/src/lib/wagmi.ts
@@ -1,14 +1,56 @@
-import { configureChains, createConfig } from "wagmi";
-import { InjectedConnector } from "wagmi/connectors/injected";
-import { MetaMaskConnector } from "wagmi/connectors/metaMask";
-import { publicProvider } from "wagmi/providers/public";
+import { http } from "viem";
+import { createConfig } from "wagmi";
+import {
+ arbitrum,
+ avalanche,
+ base,
+ bsc,
+ celo,
+ fantom,
+ filecoin,
+ kava,
+ linea,
+ mainnet,
+ manta,
+ moonbeam,
+ optimism,
+ polygon,
+ polygonMumbai,
+} from "wagmi/chains";
-import { EVM_CHAINS } from "@/constants/wagmi";
-
-const { publicClient, chains } = configureChains(EVM_CHAINS, [publicProvider()]);
-
-export const wagmiConfig = createConfig({
- autoConnect: true,
- connectors: [new MetaMaskConnector({ chains }), new InjectedConnector({ chains })],
- publicClient,
+export const config = createConfig({
+ chains: [
+ arbitrum,
+ avalanche,
+ base,
+ bsc,
+ celo,
+ fantom,
+ filecoin,
+ kava,
+ linea,
+ mainnet,
+ manta,
+ moonbeam,
+ optimism,
+ polygon,
+ polygonMumbai,
+ ],
+ transports: {
+ [arbitrum.id]: http(),
+ [avalanche.id]: http(),
+ [base.id]: http(),
+ [bsc.id]: http(),
+ [celo.id]: http(),
+ [fantom.id]: http(),
+ [filecoin.id]: http(),
+ [kava.id]: http(),
+ [linea.id]: http(),
+ [mainnet.id]: http(),
+ [manta.id]: http(),
+ [moonbeam.id]: http(),
+ [optimism.id]: http(),
+ [polygon.id]: http(),
+ [polygonMumbai.id]: http(),
+ },
});
diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx
index 389fd810..c9e49f9e 100644
--- a/src/pages/_app.tsx
+++ b/src/pages/_app.tsx
@@ -7,14 +7,14 @@ import { PersistQueryClientProvider } from "@tanstack/react-query-persist-client
import { Analytics } from "@vercel/analytics/react";
import { AppProps } from "next/app";
import { ComponentProps } from "react";
-import { WagmiConfig } from "wagmi";
+import { WagmiProvider } from "wagmi";
import { getAssetLists, getChains } from "@/chains";
import { DefaultSeo } from "@/components/DefaultSeo";
import { metadata } from "@/constants/seo";
import { wallets } from "@/lib/cosmos-kit";
import { persister, queryClient } from "@/lib/react-query";
-import { wagmiConfig } from "@/lib/wagmi";
+import { config } from "@/lib/wagmi";
type ChainProviderProps = ComponentProps;
@@ -26,34 +26,34 @@ export default function App({ Component, pageProps }: AppProps) {
<>
-
-
-
+
+
-
-
-
+
+
+
>
);
}
diff --git a/src/pages/api/contact.ts b/src/pages/api/contact.ts
deleted file mode 100644
index 4ccac204..00000000
--- a/src/pages/api/contact.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-import { PageConfig } from "next";
-import { NextRequest } from "next/server";
-import { Resend } from "resend";
-
-import { client } from "@/lib/edge-config";
-import { contactFormSchema } from "@/schemas/api";
-
-export const config: PageConfig = {
- runtime: "edge",
-};
-
-if (!process.env.RESEND_API_KEY) {
- throw new Error("RESEND_API_KEY is not set");
-}
-
-const resend = new Resend(process.env.RESEND_API_KEY);
-
-export default async function handler(req: NextRequest) {
- if (req.method.toLowerCase() === "head") {
- const status = !!(await client()
- .get("show-contact-form")
- .catch(() => false));
- return new Response(null, { status: status ? 200 : 404 }); // OK or Not Found
- }
-
- if (req.method.toLowerCase() !== "post") {
- return new Response(null, { status: 405 }); // Method Not Allowed
- }
-
- const formData = await req.formData();
- const entries = Object.fromEntries(formData.entries());
- const payload = await contactFormSchema.parseAsync(entries);
-
- const emails = (process.env.CONTACT_FORM_DEST || "support@skip.money").split(",").filter(Boolean);
-
- const { data, error } = await resend.emails.send({
- from: `support+ingest@skip.money`,
- reply_to: payload.email,
- to: emails,
- subject: `ibc.fun issue on ${payload.submitChain}`,
- text: `
-Name: ${payload.name}
-Email: ${payload.email}
-Transaction Hash: ${payload.txHash}
-Signer Account Address: ${payload.signerAddress}
-Message: ${!payload.message ? "-" : ""}
-
-${payload.message || ""}`,
- });
-
- if (!data || error) {
- console.error(error);
- return new Response(null, { status: 500 }); // Internal Server Error
- }
-
- console.log(data);
- return new Response(null, { status: 200 }); // OK
-}
diff --git a/src/schemas/api.ts b/src/schemas/api.ts
index 9d87c625..b0c70916 100644
--- a/src/schemas/api.ts
+++ b/src/schemas/api.ts
@@ -1,16 +1,5 @@
import { z } from "zod";
-export const contactFormSchema = z.object({
- txHash: z.string(),
- submitChain: z.string().min(4),
- signerAddress: z.string(),
- name: z.string(),
- email: z.string().email(),
- message: z.string().optional(),
-});
-
-export type ContactForm = z.infer;
-
export const explorerResponseSchema = z.object({
evm: z.boolean(),
explorer: z.string(),
diff --git a/src/solve/context.tsx b/src/solve/context.tsx
index 13523bb5..262d8e95 100644
--- a/src/solve/context.tsx
+++ b/src/solve/context.tsx
@@ -2,10 +2,12 @@ import { useManager } from "@cosmos-kit/react";
import { SkipRouter } from "@skip-router/core";
import { getWalletClient } from "@wagmi/core";
import { createContext, ReactNode } from "react";
+import { WalletClient } from "viem";
import { chainIdToName } from "@/chains/types";
import { API_URL, appUrl } from "@/constants/api";
import { trackWallet } from "@/context/track-wallet";
+import { config } from "@/lib/wagmi";
import { gracefullyConnect, isWalletClientUsingLedger } from "@/utils/wallet";
export const SkipContext = createContext<{ skipClient: SkipRouter } | undefined>(undefined);
@@ -54,9 +56,9 @@ export function SkipProvider({ children }: { children: ReactNode }) {
return wallet.offlineSigner;
},
getEVMSigner: async (chainID) => {
- const evmWalletClient = await getWalletClient({
+ const evmWalletClient = (await getWalletClient(config, {
chainId: parseInt(chainID),
- });
+ })) as WalletClient;
if (!evmWalletClient) {
throw new Error(`getEVMSigner error: no wallet client available for chain ${chainID}`);
diff --git a/src/test/index.tsx b/src/test/index.tsx
index 76e0b59a..d742df60 100644
--- a/src/test/index.tsx
+++ b/src/test/index.tsx
@@ -3,13 +3,13 @@ import { ChainProvider } from "@cosmos-kit/react";
import { QueryClientProvider } from "@tanstack/react-query";
import { Queries, queries, render, RenderOptions } from "@testing-library/react";
import React, { ComponentProps, FC, Fragment, PropsWithChildren } from "react";
-import { WagmiConfig } from "wagmi";
+import { WagmiProvider } from "wagmi";
import { getAssetLists, getChains } from "@/chains";
import { WalletModalProvider } from "@/components/WalletModal";
import { AssetsProvider } from "@/context/assets";
import { queryClient } from "@/lib/react-query";
-import { wagmiConfig } from "@/lib/wagmi";
+import { config } from "@/lib/wagmi";
import { SkipProvider } from "@/solve";
type ChainProviderProps = ComponentProps;
@@ -29,13 +29,13 @@ export const AllTheProviders: FC = ({ children }) => {
logLevel="NONE"
walletModal={() => }
>
-
+
{children}
-
+
diff --git a/tests/utils.ts b/tests/utils.ts
index 2246c814..f8b57498 100644
--- a/tests/utils.ts
+++ b/tests/utils.ts
@@ -54,7 +54,8 @@ export async function expectPageLoaded(page: Page) {
height: 1080,
width: 1920,
});
- await page.goto("http://localhost:3000");
+ // @ts-expect-error - playwright types are not up to date
+ await page.goto(process.env.PLAYWRIGHT_TEST_BASE_URL);
await test.expect(page.getByRole("button", { name: "Cosmos Hub" })).toBeVisible({
timeout: 5000,
});