@@ -6,6 +6,8 @@ import { createConfig, fallback, http, WagmiProvider, webSocket } from "wagmi";
6
6
import { mainnet , arbitrumSepolia , arbitrum , gnosisChiado , gnosis , sepolia } from "wagmi/chains" ;
7
7
import { walletConnect } from "wagmi/connectors" ;
8
8
9
+ import { configureSDK } from "@kleros/kleros-sdk/src/sdk" ;
10
+
9
11
import { ALL_CHAINS , DEFAULT_CHAIN } from "consts/chains" ;
10
12
import { isProductionDeployment } from "consts/index" ;
11
13
@@ -36,9 +38,10 @@ export const getDefaultChainRpcUrl = (protocol: AlchemyProtocol) => {
36
38
return getChainRpcUrl ( protocol , DEFAULT_CHAIN ) ;
37
39
} ;
38
40
41
+ const alchemyTransport = ( chain : Chain ) =>
42
+ fallback ( [ http ( alchemyURL ( "https" , chain . id ) ) , webSocket ( alchemyURL ( "wss" , chain . id ) ) ] ) ;
43
+
39
44
export const getTransports = ( ) => {
40
- const alchemyTransport = ( chain : Chain ) =>
41
- fallback ( [ http ( alchemyURL ( "https" , chain . id ) ) , webSocket ( alchemyURL ( "wss" , chain . id ) ) ] ) ;
42
45
const defaultTransport = ( chain : Chain ) =>
43
46
fallback ( [ http ( chain . rpcUrls . default ?. http ?. [ 0 ] ) , webSocket ( chain . rpcUrls . default ?. webSocket ?. [ 0 ] ) ] ) ;
44
47
@@ -62,6 +65,13 @@ const wagmiConfig = createConfig({
62
65
connectors : [ walletConnect ( { projectId, showQrModal : false } ) ] ,
63
66
} ) ;
64
67
68
+ configureSDK ( {
69
+ client : {
70
+ chain : isProduction ? arbitrum : arbitrumSepolia ,
71
+ transport : isProduction ? alchemyTransport ( arbitrum ) : alchemyTransport ( arbitrumSepolia ) ,
72
+ } ,
73
+ } ) ;
74
+
65
75
createWeb3Modal ( {
66
76
wagmiConfig,
67
77
projectId,
0 commit comments