Skip to content

Commit 19204e4

Browse files
eabdelmoneimclaude
andauthored
[SDK] Fix Safe wallet WalletConnect connection on Berachain (#8670)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 674c8d5 commit 19204e4

1 file changed

Lines changed: 2 additions & 15 deletions

File tree

packages/thirdweb/src/wallets/wallet-connect/controller.ts

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)