Skip to content

fix!: Stop using wallet:eip155 as a wildcard - #4190

Merged
FrederikBolding merged 5 commits into
mainfrom
fb/fix-preinstalled-snaps-middleware
Nov 18, 2026
Merged

FrederikBolding merged 5 commits into
mainfrom
fb/fix-preinstalled-snaps-middleware

Conversation

@FrederikBolding

@FrederikBolding FrederikBolding commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

The fact that wallet:eip155 was treated as a wildcard was a bug that was later fixed in the JSON-RPC pipeline. This means that the preinstalled Snaps middleware is currently broken. This PR aims to fix that by automatically granting all available scopes instead of using a wildcard.

Comment on lines +66 to +68
accounts: accounts.map(
(account) => `${scope}:${account}`,
) as CaipAccountId[],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: Slightly cleaner in my opinion.

Suggested change
accounts: accounts.map(
(account) => `${scope}:${account}`,
) as CaipAccountId[],
accounts: accounts.map(
(account) => `${scope}:${account}` as CaipAccountId,
),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The linter removed that as an unnecessary cast, that was my initial idea at first too

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Weird. Does it work if you specify it as return type?

Suggested change
accounts: accounts.map(
(account) => `${scope}:${account}`,
) as CaipAccountId[],
accounts: accounts.map(
(account): CaipAccountId => `${scope}:${account}`,
),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yep! e151ddb

@FrederikBolding
FrederikBolding force-pushed the fb/fix-preinstalled-snaps-middleware branch from e151ddb to 72806fa Compare November 18, 2026 12:25
@FrederikBolding
FrederikBolding marked this pull request as ready for review November 18, 2026 12:27
@FrederikBolding
FrederikBolding requested a review from a team as a code owner November 18, 2026 12:27
@FrederikBolding
FrederikBolding added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit fd63bb0 Nov 18, 2026
127 checks passed
@FrederikBolding
FrederikBolding deleted the fb/fix-preinstalled-snaps-middleware branch November 18, 2026 12:34
@codecov

codecov Bot commented Nov 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.69%. Comparing base (4c1ad78) to head (72806fa).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4190   +/-   ##
=======================================
  Coverage   98.69%   98.69%           
=======================================
  Files         429      429           
  Lines       12529    12541   +12     
  Branches     1986     1987    +1     
=======================================
+ Hits        12365    12377   +12     
  Misses        164      164           

☔ View full report in Codecov by Harness.
📢 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.

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.

2 participants