Skip to content

Commit

Permalink
馃挌 Fix: delete useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
绀兼 committed Jun 20, 2024
1 parent 02c36c1 commit 2a0c836
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/wagmi/src/wagmi-provider/config-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ export const AntDesignWeb3ConfigProvider: React.FC<AntDesignWeb3ConfigProviderPr
const { data: ensName } = useEnsName({ address });
const { data: ensAvatar } = useEnsAvatar({ name: ensName ?? undefined });

console.log('isConnecting', isIdle);

const account: Account | undefined =
address && !isDisconnected
? {
Expand Down Expand Up @@ -195,17 +193,14 @@ export const AntDesignWeb3ConfigProvider: React.FC<AntDesignWeb3ConfigProviderPr
}
availableWallets={wallets}
addressPrefix="0x"
connect={async (wallet, options, onConnectStart) => {
connect={async (wallet, options) => {
let connector = await (wallet as WalletUseInWagmiAdapter)?.getWagmiConnector?.(options);
if (!connector && wallet) {
connector = findConnectorByName(wallet.name);
}
if (!connector) {
throw new Error(`Can not find connector for ${wallet?.name}`);
}
if (onConnectStart && typeof onConnectStart === 'function') {
onConnectStart(); // Call the provided callback function
}
const { accounts } = await connectAsync({
connector,
chainId: currentChain?.id,
Expand Down

0 comments on commit 2a0c836

Please sign in to comment.