Skip to content

Conversation

@FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented May 14, 2025

Introduces the onClientRequest handler as specified in SIP-31. This handler can only be called by MetaMask and is available to all Snaps without permission. It can be used for general purpose communication that must not be exposed to dapps (as onRpcRequest).

This handler is enforced to only be callable by the metamask origin, as part of this PR this same validation is applied to all handlers in CLIENT_ONLY_HANDLERS.

Closes #3392

@codecov
Copy link

codecov bot commented May 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.07%. Comparing base (fe8513a) to head (4bfe13a).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3394   +/-   ##
=======================================
  Coverage   98.07%   98.07%           
=======================================
  Files         398      398           
  Lines       10966    10976   +10     
  Branches     1724     1728    +4     
=======================================
+ Hits        10755    10765   +10     
  Misses        211      211           

☔ 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 May 15, 2025 08:55
@FrederikBolding FrederikBolding requested a review from a team as a code owner May 15, 2025 08:55
GuillaumeRx
GuillaumeRx previously approved these changes May 15, 2025
@FrederikBolding FrederikBolding requested a review from Mrtenz May 15, 2025 09:57
Co-authored-by: Maarten Zuidhoorn <[email protected]>
Mrtenz
Mrtenz previously approved these changes May 15, 2025
@FrederikBolding FrederikBolding enabled auto-merge May 15, 2025 13:33
@FrederikBolding FrederikBolding added this pull request to the merge queue May 15, 2025
Merged via the queue into main with commit cc47984 May 15, 2025
115 checks passed
@FrederikBolding FrederikBolding deleted the fb/sip-31 branch May 15, 2025 13:44
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.

Implement SIP-31 (onClientRequest)

4 participants