dApp Connections & WalletConnect (SDK & Injected Provider)

Try Tangem secure wallet →

Table of contents


Overview of dApp Connections in MetaMask

MetaMask serves as a gateway between users and decentralized applications (dApps), enabling smooth crypto interactions without sacrificing control over your self-custody keys. But how exactly does it establish and maintain these connections? Here’s the short version: MetaMask implements two primary methods—an injected provider and WalletConnect. Both serve as communication protocols, but each comes with trade-offs related to usability, compatibility, and security.

In my experience, understanding these connection methods can save you a lot of headaches, especially if you’re someone frequently interacting with various DeFi platforms or NFT marketplaces.

Understanding Injected Provider vs WalletConnect

Injected Provider

When you visit a dApp through a browser with the MetaMask extension installed, the wallet injects a provider object into the page's JavaScript context. This “injected provider” lets the dApp call functions like eth_requestAccounts, which triggers MetaMask to ask for your permission to share your wallet address(es).

Think of this like a bouncer who stands between you and the party (the dApp). You get in only if you show your ID (approve account access).

WalletConnect

WalletConnect acts differently. It's a protocol enabling a connection between the dApp and MetaMask mobile or desktop, without relying on browser injection. Instead, you scan a QR code or tap a deep link to establish an encrypted tunnel.

This method is particularly handy for users on mobile devices or when using dApps that don't support browser extensions.

Both connection methods respect dApp permissions rigorously—MetaMask won't expose private keys or auto-confirm anything without explicit user approval.

How MetaMask Handles dApp Permissions

The permission model revolves around user consent. When a dApp initiates a request, MetaMask prompts you with details of the action—account access, transaction signing, or contract interactions. This transparency ensures you know exactly what’s happening.

However, many new users don’t realize that once you approve a site, it remains connected until manually revoked. This persistence is why managing connected sites is so critical.

Viewing and Managing Connected Sites

Here’s where “MetaMask see connected sites” comes into play.

On desktop, you can check which sites have access by opening MetaMask and navigating to Settings > Connected Sites. The list will show domains with active permissions.

On mobile, the layout differs slightly, but the path is similar: tap the menu, find Connected Sites, and view or manage connections.

Feature Desktop Location Mobile Location
View Connected Sites Settings > Connected Sites Menu > Connected Sites
Remove Connected Sites From the list, click Remove Swipe or tap Remove
See Details About Permissions Click site to view permissions Tap site for permissions info

(FYI, managing connections regularly prevents unwanted dApps from lingering with access.)

Step-by-Step: Removing Connected Sites on Mobile and Desktop

Sometimes, dApps get abandoned or you just want to tighten security. Removing connected sites is pretty simple, but what about MetaMask remove connected sites mobile? Here’s what I do:

On Desktop:

  1. Open MetaMask extension.
  2. Click the account icon, then Settings.
  3. Choose Connected Sites.
  4. Find the site to remove, click the Remove button.
  5. Confirm prompt.

On Mobile:

  1. Open MetaMask app.
  2. Tap the hamburger menu (top left).
  3. Scroll to Connected Sites.
  4. Swipe left on the site or tap it, then select Remove.
  5. Confirm your choice.

This manual step is a good habit after you finish interacting with a dApp.

Troubleshooting Connection Issues: "MetaMask Shows Not Connected"

If you encounter messages like “MetaMask says not connected” or “MetaMask showing not connected,” it usually points to communication glitches between your wallet and the dApp.

Common causes include:

Quick fixes I’ve applied involve reconnecting the wallet:

When those don’t work, checking if your MetaMask SDK connection is up-to-date (more on that below) might help.

MetaMask SDK Connections: What Developers Should Know

MetaMask provides an SDK (software development kit) to streamline connection management and enhance dApp integration. The SDK supports both injected providers and WalletConnect under the hood, making connection handling more flexible.

Developers can use methods such as requestAccounts to prompt wallet access or listen for events that signal connection or disconnection.

Why does this matter? Because reliable connection management lets dApps ensure accounts are correctly linked before commencing any action, minimizing errors (or those annoying "MetaMask request accounts" loops).

More technical readers can find in-depth SDK discussions and examples in the MetaMask developer guide.

Security Considerations and Best Practices

Think of connected dApp permissions like keys you lend out. MetaMask doesn’t expose your private keys but authorizes access to accounts, so minimizing unnecessary connections is prudent.

Key tips:

For hardware wallet users, combining MetaMask with secure element-backed devices adds protection but does not eliminate the need to monitor dApp connections.

On a final note, some ask, "Can I scan my wallet with MetaMask (metamask scan wallet)?" Clarifying here, scanning usually refers to scanning QR codes in WalletConnect to initiate sessions — never share your seed phrase or private keys via scanning apps.

Conclusion and Further Resources

Connecting MetaMask to dApps is foundational for everyday crypto interactions, from swapping tokens to staking in DeFi. Whether through the injected provider or WalletConnect, understanding how these connections work—and how to manage them securely—can make a big difference in your user experience.

If you’re curious about controlling your wallet’s connected sites better or troubleshooting connection problems, I suggest diving into guides like manage-connected-sites and walletconnect-guide.

And remember: stay vigilant about permissions and never hesitate to disconnect a dApp that you no longer trust or use. Your crypto safety depends on it.

Ready to get hands-on? Check out the full MetaMask SDK connection guide if you're a developer, or explore connecting to dapps for user-centric insights.

Safe trading and swapping!

Try Tangem secure wallet →