Skip to content

Commit e8f5dab

Browse files
authored
chore: mark getAccounts → getPermittedAccountsForOrigin rename as breaking in eip-5792-middleware changelog (#8060)
## Explanation <!-- 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 changes whose purpose might not obvious to those unfamiliar with the domain? * If your primary goal was to update one package but you found you had to update another one along the way, why did you do so? * If you had to upgrade a dependency, why did you do so? --> - Mark the #7816 changelog entry in @metamask/eip-5792-middleware as BREAKING, since it renames the getAccounts hook to getPermittedAccountsForOrigin (with a changed signature) across walletSendCalls, walletGetCapabilities, and ProcessSendCallsHooks - Add migration guidance for consumers ## References <!-- Are there any issues that this pull request is tied to? Are there other links that reviewers should consult to understand these changes better? Are there client or consumer pull requests to adopt any breaking changes? For example: * Fixes #12345 * Related to #67890 --> ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [ ] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md) - [ ] I've introduced [breaking changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md) in this PR and have prepared draft pull requests for clients and consumer packages to resolve them <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Documentation-only change that clarifies a previously introduced breaking API rename; no runtime behavior is modified. > > **Overview** > Updates the `@metamask/eip-5792-middleware` `CHANGELOG.md` to explicitly mark the `getAccounts` � `getPermittedAccountsForOrigin` hook rename as **BREAKING** for `walletSendCalls`, `walletGetCapabilities`, and `ProcessSendCallsHooks`, and adds brief migration guidance (new hook name/signature and `origin` requirement on the request). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 01cbe17. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent ebf29db commit e8f5dab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/eip-5792-middleware/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818

1919
- Bump `@metamask/transaction-controller` from `^62.7.0` to `^62.19.0` ([#7596](https://github.com/MetaMask/core/pull/7596), [#7602](https://github.com/MetaMask/core/pull/7602), [#7604](https://github.com/MetaMask/core/pull/7604), [#7642](https://github.com/MetaMask/core/pull/7642), [#7737](https://github.com/MetaMask/core/pull/7737), [#7760](https://github.com/MetaMask/core/pull/7760), [#7775](https://github.com/MetaMask/core/pull/7775), [#7802](https://github.com/MetaMask/core/pull/7802), [#7832](https://github.com/MetaMask/core/pull/7832), [#7854](https://github.com/MetaMask/core/pull/7854), [#7872](https://github.com/MetaMask/core/pull/7872), [#7996](https://github.com/MetaMask/core/pull/7996), [#8005](https://github.com/MetaMask/core/pull/8005), [#8031](https://github.com/MetaMask/core/pull/8031))
2020
- Bump `@metamask/utils` from `^11.8.1` to `^11.9.0` ([#7511](https://github.com/MetaMask/core/pull/7511))
21-
- Make `wallet_sendCalls` more reliable ([#7816](https://github.com/MetaMask/core/pull/7816))
21+
- **BREAKING:** Replace `getAccounts` hook with `getPermittedAccountsForOrigin` in `walletSendCalls`, `walletGetCapabilities`, and `ProcessSendCallsHooks` ([#7816](https://github.com/MetaMask/core/pull/7816))
22+
- Consumers must rename the `getAccounts` hook to `getPermittedAccountsForOrigin` and update its signature from `(req: JsonRpcRequest) => Promise<string[]>` to `() => Promise<string[]>`. The `req` parameter passed to `walletSendCalls` and `walletGetCapabilities` must now include an `origin` property.
2223

2324
## [2.1.0]
2425

0 commit comments

Comments
 (0)