Skip to content

Commit

Permalink
fix: Coinbase Wallet connection on same chain (#5656)
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquim-verges authored Dec 9, 2024
1 parent df734ba commit f680496
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/dirty-goats-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

Fix connecting to cb wallet browser extension when already on the same chain
6 changes: 1 addition & 5 deletions packages/thirdweb/src/wallets/coinbase/coinbase-web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,11 +463,7 @@ export async function connectCoinbaseWalletSDK(
? options.chain
: getCachedChain(chainId);
// Switch to chain if provided
if (
connectedChainId &&
options?.chain &&
connectedChainId !== options?.chain.id
) {
if (chainId && options?.chain && chainId !== options?.chain.id) {
await switchChainCoinbaseWalletSDK(provider, options.chain);
chain = options.chain;
}
Expand Down

0 comments on commit f680496

Please sign in to comment.