From 182de393510d578d68b39d04dfe8e288c09665b6 Mon Sep 17 00:00:00 2001 From: Dmytro Date: Wed, 28 Aug 2024 16:01:39 +0100 Subject: [PATCH] Fix walletClient types --- src/Router.tsx | 4 +++- src/components/TokenBalanceTile.tsx | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Router.tsx b/src/Router.tsx index 421232e..8aaae88 100644 --- a/src/Router.tsx +++ b/src/Router.tsx @@ -23,6 +23,8 @@ import './App.scss' import { useState, useEffect } from 'react' +import { WalletClient } from 'viem' + import { Helmet } from 'react-helmet' import { useLocation, Routes, Route, useSearchParams } from 'react-router-dom' import { TransitionGroup, CSSTransition } from 'react-transition-group' @@ -132,7 +134,7 @@ export default function Router() { const { chainId } = await mpc.mainnet().provider.getNetwork() await enforceNetwork( chainId, - walletClient, + walletClient as WalletClient, switchChainAsync!, mpc.config.skaleNetwork, MAINNET_CHAIN_NAME diff --git a/src/components/TokenBalanceTile.tsx b/src/components/TokenBalanceTile.tsx index d324cf5..b02be41 100644 --- a/src/components/TokenBalanceTile.tsx +++ b/src/components/TokenBalanceTile.tsx @@ -22,6 +22,7 @@ */ import { Contract } from 'ethers' +import { WalletClient } from 'viem' import { useState, useEffect } from 'react' import { @@ -85,7 +86,7 @@ export default function TokenBalanceTile(props: { mpc: MetaportCore; chain: stri const { chainId } = await props.mpc.provider(props.chain).getNetwork() await enforceNetwork( chainId, - walletClient, + walletClient as WalletClient, switchChainAsync!, props.mpc.config.skaleNetwork, props.chain