diff --git a/.changeset/blue-games-happen.md b/.changeset/blue-games-happen.md new file mode 100644 index 000000000..bf14bee7c --- /dev/null +++ b/.changeset/blue-games-happen.md @@ -0,0 +1,5 @@ +--- +'@ant-design/web3-wagmi': patch +--- + +fix(web3-wagmi): Correct spelling of "Factories" diff --git a/packages/wagmi/src/wagmi-provider/__tests__/balance.test.tsx b/packages/wagmi/src/wagmi-provider/__tests__/balance.test.tsx index 472fe8e6e..57c7972ef 100644 --- a/packages/wagmi/src/wagmi-provider/__tests__/balance.test.tsx +++ b/packages/wagmi/src/wagmi-provider/__tests__/balance.test.tsx @@ -76,7 +76,7 @@ describe('WagmiWeb3ConfigProvider balance', () => { const App = () => ( @@ -105,7 +105,7 @@ describe('WagmiWeb3ConfigProvider balance', () => { const App = () => ( diff --git a/packages/wagmi/src/wagmi-provider/__tests__/connect-with-universal-wallet.test.tsx b/packages/wagmi/src/wagmi-provider/__tests__/connect-with-universal-wallet.test.tsx index 59c621914..9dede74e3 100644 --- a/packages/wagmi/src/wagmi-provider/__tests__/connect-with-universal-wallet.test.tsx +++ b/packages/wagmi/src/wagmi-provider/__tests__/connect-with-universal-wallet.test.tsx @@ -122,7 +122,7 @@ describe('WagmiWeb3ConfigProvider connect with UniversalWallet', () => { const App = () => ( @@ -191,7 +191,7 @@ describe('WagmiWeb3ConfigProvider connect with UniversalWallet', () => { const App = () => ( diff --git a/packages/wagmi/src/wagmi-provider/__tests__/connect.test.tsx b/packages/wagmi/src/wagmi-provider/__tests__/connect.test.tsx index 364f28698..f5835cb75 100644 --- a/packages/wagmi/src/wagmi-provider/__tests__/connect.test.tsx +++ b/packages/wagmi/src/wagmi-provider/__tests__/connect.test.tsx @@ -124,7 +124,7 @@ describe('WagmiWeb3ConfigProvider connect', () => { const App = () => ( @@ -194,7 +194,7 @@ describe('WagmiWeb3ConfigProvider connect', () => { const App = () => ( diff --git a/packages/wagmi/src/wagmi-provider/__tests__/ens.test.tsx b/packages/wagmi/src/wagmi-provider/__tests__/ens.test.tsx index 41a59ed94..2785122ea 100644 --- a/packages/wagmi/src/wagmi-provider/__tests__/ens.test.tsx +++ b/packages/wagmi/src/wagmi-provider/__tests__/ens.test.tsx @@ -89,7 +89,7 @@ describe('WagmiWeb3ConfigProvider ens', () => { const App = () => ( @@ -126,7 +126,7 @@ describe('WagmiWeb3ConfigProvider ens', () => { const App = () => ( diff --git a/packages/wagmi/src/wagmi-provider/__tests__/nft.test.tsx b/packages/wagmi/src/wagmi-provider/__tests__/nft.test.tsx index 1bd4e4eda..f632d2b36 100644 --- a/packages/wagmi/src/wagmi-provider/__tests__/nft.test.tsx +++ b/packages/wagmi/src/wagmi-provider/__tests__/nft.test.tsx @@ -83,7 +83,7 @@ describe('WagmiWeb3ConfigProvider getMetadata', () => { const App = () => ( diff --git a/packages/wagmi/src/wagmi-provider/__tests__/switch-chain-unconnected.test.tsx b/packages/wagmi/src/wagmi-provider/__tests__/switch-chain-unconnected.test.tsx index a008a84a2..f1a774f7d 100644 --- a/packages/wagmi/src/wagmi-provider/__tests__/switch-chain-unconnected.test.tsx +++ b/packages/wagmi/src/wagmi-provider/__tests__/switch-chain-unconnected.test.tsx @@ -76,7 +76,7 @@ describe('switch chain when not connected', () => { const App = () => ( diff --git a/packages/wagmi/src/wagmi-provider/__tests__/switch-chain.test.tsx b/packages/wagmi/src/wagmi-provider/__tests__/switch-chain.test.tsx index 19ccfcd9b..170044985 100644 --- a/packages/wagmi/src/wagmi-provider/__tests__/switch-chain.test.tsx +++ b/packages/wagmi/src/wagmi-provider/__tests__/switch-chain.test.tsx @@ -92,7 +92,7 @@ describe('switch chain when connect', () => { const App = () => ( diff --git a/packages/wagmi/src/wagmi-provider/config-provider.tsx b/packages/wagmi/src/wagmi-provider/config-provider.tsx index a27962623..2df0a4d1f 100644 --- a/packages/wagmi/src/wagmi-provider/config-provider.tsx +++ b/packages/wagmi/src/wagmi-provider/config-provider.tsx @@ -26,7 +26,7 @@ import { getNFTMetadata } from './methods'; export interface AntDesignWeb3ConfigProviderProps { chainAssets: Chain[]; - walletFactorys: WalletFactory[]; + walletFactories: WalletFactory[]; locale?: Locale; children?: React.ReactNode; ens?: boolean; @@ -39,7 +39,7 @@ export const AntDesignWeb3ConfigProvider: React.FC item.connectors.includes(connector.name)) + !walletFactories.find((item) => item.connectors.includes(connector.name)) ) { // not config wallet and find the wallet in connectors, auto add it autoAddEIP6963Wallets.push(EIP6963Wallet().create([connector])); @@ -92,7 +92,7 @@ export const AntDesignWeb3ConfigProvider: React.FC + const walletFactory = walletFactories.find((factory) => factory.connectors.includes(connector.name), ); @@ -105,7 +105,7 @@ export const AntDesignWeb3ConfigProvider: React.FC { const connectors = factory.connectors .map(findConnectorByName) @@ -125,7 +125,7 @@ export const AntDesignWeb3ConfigProvider: React.FC item !== null) as Wallet[]; return [...supportWallets, ...autoAddEIP6963Wallets]; - }, [wagimConfig.connectors, walletFactorys, eip6963]); + }, [wagimConfig.connectors, walletFactories, eip6963]); const chainList: Chain[] = React.useMemo(() => { return wagimConfig.chains diff --git a/packages/wagmi/src/wagmi-provider/index.tsx b/packages/wagmi/src/wagmi-provider/index.tsx index aeb4ae487..f5f372318 100644 --- a/packages/wagmi/src/wagmi-provider/index.tsx +++ b/packages/wagmi/src/wagmi-provider/index.tsx @@ -46,7 +46,7 @@ export function WagmiWeb3ConfigProvider({