-
Notifications
You must be signed in to change notification settings - Fork 644
Bump MetaMask core packages #1818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump MetaMask core packages #1818
Conversation
|
New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: @metamask/utils@3.6.0 |
| export function getImplementation({ getLocale }: GetLocaleMethodHooks) { | ||
| return async function implementation( | ||
| _args: RestrictedMethodOptions<void>, | ||
| _args: RestrictedMethodOptions<any>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is a bit difficult, I'm not sure what we we should type this as since we don't use the arguments at all. Any was the best I could come up with, but I don't think it should matter much since the arguments are discarded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Json?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't work, but RestrictedMethodParameters does.
.yarn/patches/@esbuild-plugins-node-modules-polyfill-npm-0.2.2-f612681798.patch
Show resolved
Hide resolved
| request, | ||
| target: snapId, | ||
| }, | ||
| } as Record<string, Json>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing params is causing grief here? if so, could we move the type assertion to params?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is in fact request that is typed as Record<string, Json> but should be a JsonRpcRequest by the time we get here. I have moved the cast.
9f2ef29 to
bb2dcbd
Compare
This fixes the Snaps controllers and execution environments tests on #1818.
This fixes the Snaps controllers and execution environments tests on
8c9ba92 to
8b0ed91
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## feat/error-handling #1818 +/- ##
=======================================================
- Coverage 95.98% 95.97% -0.02%
=======================================================
Files 241 241
Lines 5586 5592 +6
Branches 877 881 +4
=======================================================
+ Hits 5362 5367 +5
- Misses 224 225 +1
☔ View full report in Codecov by Sentry. |
Rebased and updated version of #1728 - Updates and uses `@metamask/rpc-errors` everywhere - Updates and uses `@metamask/json-rpc-engine` everywhere - Updates the following packages to latest: `@metamask/permission-controller`, `@metamask/approval-controller`, `@metamask/providers`, `@metamask/eth-json-rpc-middleware` Huge thank you to @legobeat for all of the help landing this ❤️ Blocked by #1823 --------- Co-authored-by: legobt <6wbvkn0j@anonaddy.me> Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
Rebased and updated version of #1728 - Updates and uses `@metamask/rpc-errors` everywhere - Updates and uses `@metamask/json-rpc-engine` everywhere - Updates the following packages to latest: `@metamask/permission-controller`, `@metamask/approval-controller`, `@metamask/providers`, `@metamask/eth-json-rpc-middleware` Huge thank you to @legobeat for all of the help landing this ❤️ Blocked by #1823 --------- Co-authored-by: legobt <6wbvkn0j@anonaddy.me> Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
Rebased and updated version of #1728 - Updates and uses `@metamask/rpc-errors` everywhere - Updates and uses `@metamask/json-rpc-engine` everywhere - Updates the following packages to latest: `@metamask/permission-controller`, `@metamask/approval-controller`, `@metamask/providers`, `@metamask/eth-json-rpc-middleware` Huge thank you to @legobeat for all of the help landing this ❤️ Blocked by #1823 --------- Co-authored-by: legobt <6wbvkn0j@anonaddy.me> Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
This improves error handling by: - Using `@metamask/rpc-errors` instead of `eth-rpc-errors` throughout the entire stack. - Introducing a new `SnapError`, which will not cause the Snap to crash when thrown. - Unwrapping errors where possible. - Also bumps a ton of MetaMask dependencies, see #1818 --------- Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com> Co-authored-by: legobt <6wbvkn0j@anonaddy.me>
This improves error handling by: - Using `@metamask/rpc-errors` instead of `eth-rpc-errors` throughout the entire stack. - Introducing a new `SnapError`, which will not cause the Snap to crash when thrown. - Unwrapping errors where possible. - Also bumps a ton of MetaMask dependencies, see MetaMask/snaps#1818 --------- Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com> Co-authored-by: legobt <6wbvkn0j@anonaddy.me>
Rebased and updated version of #1728
@metamask/rpc-errorseverywhere@metamask/json-rpc-engineeverywhere@metamask/permission-controller,@metamask/approval-controller,@metamask/providers,@metamask/eth-json-rpc-middlewareHuge thank you to @legobeat for all of the help landing this ❤️
Blocked by #1823