Skip to content

Conversation

@Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Nov 5, 2025

This logic may not be needed. Pending verification.


Note

Removes automatic granting of endowment:caip25 and related network lookups, updates default dynamic permission to endowment:caip25, and adjusts tests accordingly.

  • Core (SnapController.ts):
    • Remove logic that auto-added endowment:caip25 based on endowment:ethereum-provider (and associated network client lookups); permissions are now granted as requested without modification.
    • Drop NetworkController:getNetworkClientById and SelectedNetworkController:getNetworkClientIdForDomain from allowed actions; remove hex/hexToNumber usage.
    • Change default dynamicPermissions from eth_accounts to endowment:caip25.
  • Tests (SnapController.test.tsx):
    • Delete tests asserting auto-grant of endowment:caip25 on install/update; keep install/update flows without CAIP-25 injection.
    • Update dynamic permissions revocation test to use endowment:caip25 instead of eth_accounts.

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

@codecov
Copy link

codecov bot commented Nov 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.27%. Comparing base (e5f394c) to head (9800313).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3723      +/-   ##
==========================================
- Coverage   98.28%   98.27%   -0.01%     
==========================================
  Files         418      418              
  Lines       12152    12146       -6     
  Branches     1876     1875       -1     
==========================================
- Hits        11943    11937       -6     
  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.

@Mrtenz Mrtenz marked this pull request as ready for review November 5, 2025 12:09
@Mrtenz Mrtenz requested a review from a team as a code owner November 5, 2025 12:09
messenger,
state,
dynamicPermissions = ['eth_accounts'],
dynamicPermissions = ['endowment:caip25'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to adapt the unit test that used this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@Mrtenz Mrtenz added this pull request to the merge queue Nov 5, 2025
Merged via the queue into main with commit 49948b2 Nov 5, 2025
121 checks passed
@Mrtenz Mrtenz deleted the mrtenz/remove-caip-25-logic branch November 5, 2025 15:18
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.

3 participants