Skip to content

Conversation

@FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented Nov 27, 2025

Use EIP-6963 for the test-snaps page, preventing collisions with wallets that don't support Snaps.

Mostly re-uses the logic from snaps-directory, adapting it to this repo.

Fixes #3753


Note

Adopts EIP-6963 to discover a MetaMask provider that supports Snaps and routes all RPC requests through it.

  • Provider discovery and Snaps support:
    • Add hasSnapsSupport, getMetaMaskEIP6963Provider, and getSnapsProvider to find a MetaMask provider via EIP-6963 and verify wallet_getSnaps support.
    • Update request base query to use the discovered provider and assert presence before RPC calls.
  • Type augmentations:
    • Extend window.ethereum to include setProvider, detected, and providers.
    • Add WindowEventMap entries for eip6963:requestProvider and eip6963:announceProvider.
  • Imports:
    • Import EIP-6963 event types and assert from @metamask/utils.

Written by Cursor Bugbot for commit 994719c. This will update automatically on new commits. Configure here.

@codecov
Copy link

codecov bot commented Nov 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.28%. Comparing base (9392ef9) to head (994719c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3757   +/-   ##
=======================================
  Coverage   98.28%   98.28%           
=======================================
  Files         418      418           
  Lines       12186    12186           
  Branches     1887     1887           
=======================================
  Hits        11977    11977           
  Misses        209      209           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@FrederikBolding FrederikBolding marked this pull request as ready for review November 27, 2025 13:50
@FrederikBolding FrederikBolding requested a review from a team as a code owner November 27, 2025 13:50
@FrederikBolding FrederikBolding added this pull request to the merge queue Nov 28, 2025
Merged via the queue into main with commit 2f487f2 Nov 28, 2025
122 checks passed
@FrederikBolding FrederikBolding deleted the fb/test-snaps-eip6963 branch November 28, 2025 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use EIP-6963 for test-snaps

3 participants