Skip to content

Commit

Permalink
Revert "fix: incorrect chains error log (#1278)"
Browse files Browse the repository at this point in the history
This reverts commit 250e74e.
  • Loading branch information
yutingzhao1991 authored Dec 16, 2024
1 parent 250e74e commit 539b3a1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
5 changes: 0 additions & 5 deletions .changeset/poor-beans-dream.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ describe('WagmiWeb3ConfigProvider config', () => {
</WagmiWeb3ConfigProvider>
);
const { baseElement } = render(<App />);
expect(baseElement.querySelector('.chains-name')?.textContent).toBe('Polygon,Goerli,Ethereum');
expect(baseElement.querySelector('.chains-name')?.textContent).toBe('Ethereum');
});

it('avaliable chains with assets', () => {
Expand Down Expand Up @@ -186,9 +186,7 @@ describe('WagmiWeb3ConfigProvider config', () => {
</WagmiWeb3ConfigProvider>
);
const { baseElement } = render(<App />);
expect(baseElement.querySelector('.chains-name')?.textContent).toBe(
'Polygon,Ethereum,Base,Goerli',
);
expect(baseElement.querySelector('.chains-name')?.textContent).toBe('Polygon,Ethereum,Base');
});

it('empty connectors', () => {
Expand Down
10 changes: 1 addition & 9 deletions packages/wagmi/src/wagmi-provider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,7 @@ export function WagmiWeb3ConfigProvider({
// When user custom config, add Mainnet by default
// When user not provide config, auto generate config, chains use user provided chains
const chainAssets: ChainAssetWithWagmiChain[] = config
? [
Mainnet,
...chains,
...config.chains.map((chain) => ({
id: chain.id,
name: chain.name,
wagmiChain: chain,
})),
]
? [Mainnet, ...chains]
: chains?.length
? chains
: [Mainnet];
Expand Down

0 comments on commit 539b3a1

Please sign in to comment.