-
-
Notifications
You must be signed in to change notification settings - Fork 246
refactor: fully extract middleware into EIP-5792 Middleware package #6477
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
Conversation
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
* @param options - Configuration object containing the getAccounts function. | ||
* @param options.getAccounts - Function to retrieve accounts for the requester. | ||
* @returns A normalized (lowercase) hex address if valid and authorized. | ||
* @throws JsonRpcError with unauthorized error if the requester doesn't have permission to access the address. |
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.
* @throws JsonRpcError with unauthorized error if the requester doesn't have permission to access the address. | |
* @throws JsonRpcError with unauthorized error if the requester doesn't have permission to access the address. |
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.
LGTM
…) package (#401) <!-- Thanks for your contribution! Take a moment to answer these questions so that reviewers have the information they need to properly understand your changes: * What is the current state of things and why does it need to change? * What is the solution your changes offer and how does it work? Are there any issues or other links reviewers should consult to understand this pull request better? For instance: * Fixes #12345 * See: #67890 --> ## Explanation The newly created EIP-5792 Middleware package ([PR #6422](MetaMask/core#6422)) currently contains only the hooks required for the existing wallet middleware. To align with the intended abstraction and reduce the monolithic nature of wallet-middleware, we should fully extract the relevant middleware logic from eth-json-rpc-middleware ([GitHub - MetaMask/eth-json-rpc-middleware: Ethereum middleware for composing an Ethereum provider using json-rpc-engine. Intended to replace provider-engine](https://github.com/MetaMask/eth-json-rpc-middleware)) into this new package. This PR removes the identified middleware into @metamask/eip-5792-middleware. PR [#6477](MetaMask/core#6477) from https://github.com/MetaMask/core moves this middleware to the specified package. * Fixes https://consensyssoftware.atlassian.net/browse/WAPI-691
Explanation
The newly created EIP-5792 Middleware package (PR #6422) currently contains only the hooks required for the existing wallet middleware. To align with the intended abstraction and reduce the monolithic nature of wallet-middleware, we should fully extract the relevant middleware logic from eth-json-rpc-middleware (GitHub - MetaMask/eth-json-rpc-middleware: Ethereum middleware for composing an Ethereum provider using json-rpc-engine. Intended to replace provider-engine) into this new package.
This PR moves the identified middleware into @metamask/eip-5792-middleware.
References
Checklist