Skip to content

Commit 385bf0f

Browse files
authored
Add default transport for wagmi config (#2736)
1 parent 7108ef2 commit 385bf0f

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

packages/apps/fortune/exchange-oracle/client/src/providers/WagmiProvider.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { FC, PropsWithChildren } from 'react';
2-
import { createConfig, WagmiProvider as WWagmiProvider } from 'wagmi';
2+
import { createConfig, http, WagmiProvider as WWagmiProvider } from 'wagmi';
33
import * as wagmiChains from 'wagmi/chains';
44
import { coinbaseWallet, walletConnect } from 'wagmi/connectors';
55

@@ -32,6 +32,21 @@ export const wagmiConfig = createConfig({
3232
appName: 'human-job-launcher',
3333
}),
3434
],
35+
transports: {
36+
[wagmiChains.mainnet.id]: http(),
37+
[wagmiChains.sepolia.id]: http(),
38+
[wagmiChains.bsc.id]: http(),
39+
[wagmiChains.bscTestnet.id]: http(),
40+
[wagmiChains.polygon.id]: http(),
41+
[wagmiChains.polygonAmoy.id]: http(),
42+
[wagmiChains.moonbeam.id]: http(),
43+
[wagmiChains.moonbaseAlpha.id]: http(),
44+
[wagmiChains.avalanche.id]: http(),
45+
[wagmiChains.avalancheFuji.id]: http(),
46+
[wagmiChains.xLayer.id]: http(),
47+
[wagmiChains.xLayerTestnet.id]: http(),
48+
[LOCALHOST.id]: http(LOCALHOST.rpcUrls.default.http[0]),
49+
},
3550
});
3651

3752
export const WagmiProvider: FC<PropsWithChildren> = ({ children }) => {

packages/apps/job-launcher/client/src/providers/WagmiProvider.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { FC, PropsWithChildren } from 'react';
2-
import { createConfig, WagmiProvider as WWagmiProvider } from 'wagmi';
2+
import { createConfig, http, WagmiProvider as WWagmiProvider } from 'wagmi';
33
import * as wagmiChains from 'wagmi/chains';
44
import { coinbaseWallet, walletConnect } from 'wagmi/connectors';
55

@@ -32,6 +32,21 @@ export const wagmiConfig = createConfig({
3232
appName: 'human-job-launcher',
3333
}),
3434
],
35+
transports: {
36+
[wagmiChains.mainnet.id]: http(),
37+
[wagmiChains.sepolia.id]: http(),
38+
[wagmiChains.bsc.id]: http(),
39+
[wagmiChains.bscTestnet.id]: http(),
40+
[wagmiChains.polygon.id]: http(),
41+
[wagmiChains.polygonAmoy.id]: http(),
42+
[wagmiChains.moonbeam.id]: http(),
43+
[wagmiChains.moonbaseAlpha.id]: http(),
44+
[wagmiChains.avalanche.id]: http(),
45+
[wagmiChains.avalancheFuji.id]: http(),
46+
[wagmiChains.xLayer.id]: http(),
47+
[wagmiChains.xLayerTestnet.id]: http(),
48+
[LOCALHOST.id]: http(LOCALHOST.rpcUrls.default.http[0]),
49+
},
3550
});
3651

3752
export const WagmiProvider: FC<PropsWithChildren> = ({ children }) => {

0 commit comments

Comments
 (0)