Skip to content

Commit

Permalink
Fix walletClient types
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytrotkk committed Aug 28, 2024
1 parent 9bb0397 commit 182de39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/components/TokenBalanceTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*/

import { Contract } from 'ethers'
import { WalletClient } from 'viem'
import { useState, useEffect } from 'react'

import {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 182de39

Please sign in to comment.