Skip to content

Commit 179590b

Browse files
authored
chore(browser-playground): add support for local nodes via wagmi (#246)
1 parent 0642361 commit 179590b

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

playground/browser-playground/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Changed
1111

12+
- Add `localhost` to wagmi's configured chains ([#246](https://github.com/MetaMask/connect-monorepo/pull/246))
1213
- Bump wagmi from `^2.19.2` to `^3.5.0` and apply v3 migration changes: use `useConnectors()` instead of `useConnect().connectors`, `useChains()` instead of `useSwitchChain().chains`, and rename `useAccount` to `useConnection` ([#233](https://github.com/MetaMask/connect-monorepo/pull/233))
1314
- Bump `@wagmi/core` from `^2.22.1` to `^3.4.0` ([#233](https://github.com/MetaMask/connect-monorepo/pull/233))
1415
- Bump `@tanstack/react-query` from `>=5.45.1` to `^5.90.21` ([#233](https://github.com/MetaMask/connect-monorepo/pull/233))

playground/browser-playground/src/wagmi/config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/* eslint-disable no-restricted-globals -- Browser playground uses window */
22
import { createConfig, http } from 'wagmi';
3-
import { mainnet, sepolia, optimism, celo } from 'wagmi/chains';
3+
import { mainnet, sepolia, optimism, celo, localhost } from 'wagmi/chains';
44

55
import { metaMask } from './metamask-connector';
66

77
export const wagmiConfig = createConfig({
8-
chains: [mainnet, sepolia, optimism, celo],
8+
chains: [mainnet, sepolia, optimism, celo, localhost],
99
connectors: [
1010
metaMask({
1111
dapp: {
@@ -19,6 +19,7 @@ export const wagmiConfig = createConfig({
1919
[sepolia.id]: http(),
2020
[optimism.id]: http(),
2121
[celo.id]: http(),
22+
[localhost.id]: http(),
2223
},
2324
});
2425

0 commit comments

Comments
 (0)