Skip to content

Commit

Permalink
fix: ts error after upgrade wagmi (#1304)
Browse files Browse the repository at this point in the history
Co-authored-by: tingzhao.ytz <[email protected]>
  • Loading branch information
yutingzhao1991 and tingzhao.ytz authored Dec 26, 2024
1 parent 8b857d3 commit be3ca13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/eth-web3js/src/web3js-provider/web3js-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
type WagmiWeb3ConfigProviderProps,
} from '@ant-design/web3-wagmi';
import type { Chain } from 'viem';
import { createConfig, http, type CreateConfigParameters, type Storage } from 'wagmi';
import { createConfig, http, type CreateConnectorFn, type Storage } from 'wagmi';
import * as wagmiChains from 'wagmi/chains';
import * as wagmiConnectors from 'wagmi/connectors';

Expand Down Expand Up @@ -40,7 +40,7 @@ export const EthWeb3jsConfigProvider: React.FC<

const wagmiConfig = React.useMemo(() => {
const transports = Object.fromEntries(chains.map((chain) => [chain.id, http()]));
const connectors: CreateConfigParameters['connectors'] = [wagmiConnectors.injected()];
const connectors: CreateConnectorFn[] = [wagmiConnectors.injected()];

(props.wallets ?? []).forEach((wallet) => {
if (wallet.name) {
Expand Down
4 changes: 2 additions & 2 deletions packages/ethers/src/ethers-provider/ethers-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
type WagmiWeb3ConfigProviderProps,
} from '@ant-design/web3-wagmi';
import type { Chain } from 'viem';
import { createConfig, http, type CreateConfigParameters, type Storage } from 'wagmi';
import { createConfig, http, type CreateConnectorFn, type Storage } from 'wagmi';
import * as wagmiChains from 'wagmi/chains';
import * as wagmiConnectors from 'wagmi/connectors';

Expand Down Expand Up @@ -41,7 +41,7 @@ export const EthersWeb3ConfigProvider: React.FC<

const wagmiConfig = React.useMemo(() => {
const transports = Object.fromEntries(chains.map((chain) => [chain.id, http()]));
const connectors: CreateConfigParameters['connectors'] = [wagmiConnectors.injected()];
const connectors: CreateConnectorFn[] = [wagmiConnectors.injected()];

(props.wallets ?? []).forEach((wallet) => {
if (wallet.name) {
Expand Down

0 comments on commit be3ca13

Please sign in to comment.