Skip to content

Commit

Permalink
fix: add check for coinbase browser
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov committed Aug 15, 2024
1 parent bbbf91e commit 1899e6d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/wallet-management/src/utils/isWalletInstalled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ export const isWalletInstalled = (id: string): boolean => {
);
case 'coinbase':
return (
anyWindow?.ethereum?.isCoinbaseWallet ||
// Coinbase Browser doesn't inject itself automatically
// We should not consider Coinbase Browser as installed wallet so we can fallback to Coinbase SDK
(anyWindow?.ethereum?.isCoinbaseWallet &&
!anyWindow?.ethereum?.isCoinbaseBrowser) ||
anyWindow?.coinbaseWalletExtension?.isCoinbaseWallet ||
anyWindow?.ethereum?.providers?.some(
(provider: any) => provider.isCoinbaseWallet,
Expand Down

0 comments on commit 1899e6d

Please sign in to comment.