@@ -110,14 +110,11 @@ export async function connectWC(
110110 }
111111
112112 let optionalChains : Chain [ ] | undefined = wcOptions ?. optionalChains ;
113- let chainToRequest = options . chain ;
113+ const chainToRequest = options . chain ;
114114
115115 // ignore the given options chains - and set the safe supported chains
116116 if ( walletId === "global.safe" ) {
117117 optionalChains = chainsToRequestForSafe . map ( getCachedChain ) ;
118- if ( chainToRequest && ! optionalChains . includes ( chainToRequest ) ) {
119- chainToRequest = undefined ;
120- }
121118 }
122119
123120 // For UniversalProvider, we still need chain configuration for session management
@@ -386,17 +383,6 @@ async function initProvider(
386383 "@walletconnect/universal-provider"
387384 ) ;
388385
389- let optionalChains : Chain [ ] | undefined = wcOptions ?. optionalChains ;
390- let chainToRequest = options . chain ;
391-
392- // ignore the given options chains - and set the safe supported chains
393- if ( walletId === "global.safe" ) {
394- optionalChains = chainsToRequestForSafe . map ( getCachedChain ) ;
395- if ( chainToRequest && ! optionalChains . includes ( chainToRequest ) ) {
396- chainToRequest = undefined ;
397- }
398- }
399-
400386 const provider = await UniversalProvider . init ( {
401387 metadata : {
402388 description :
@@ -736,4 +722,5 @@ const chainsToRequestForSafe = [
736722 1101 , // Polygon zkEVM Mainnet
737723 324 , // zkSync Era mainnet
738724 534352 , // Scroll mainnet
725+ 80094 , // Berachain mainnet
739726] ;
0 commit comments