You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: remove all selectedNetworkClientid references in bridge-controller (#6996)
## 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?
-->
## 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/contributing.md#updating-changelogs),
highlighting breaking changes as necessary
- [ ] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Removes all selectedNetworkClientId references, deriving network
clients via srcChainId, refactors metrics request params, and updates
tests/snapshots accordingly.
>
> - **Bridge Controller**:
> - Remove selected network usage: delete
`#getSelectedNetworkClientId`/`#getSelectedNetworkClient`; resolve
clients via `NetworkController:findNetworkClientIdByChainId` in
`#getNetworkClientByChainId`.
> - Use srcChainId-derived client for balance checks and provider
config; treat non‑EVM src chains accordingly.
> - Simplify polling input: drop `networkClientId` from
`BridgePollingInput` and `startPolling` calls.
> - **Metrics**:
> - Refactor `getRequestParams` to take only `quoteRequest` (no external
srcChainId param) with ETH fallback; update all event builders to use
new signature.
> - **Types**:
> - Remove `NetworkController:getState` from allowed actions and
`NetworkClientId` import/usages.
> - **Tests/Snapshots**:
> - Update mocks and expectations to remove `selectedNetworkClientId`;
adjust call counts and snapshots; ensure network lookup by chainId.
> - **Changelog**:
> - Add Fixed note documenting removal of `selectedNetworkClientId`
usages.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
131d042. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Copy file name to clipboardExpand all lines: packages/bridge-controller/CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
### Fixed
11
+
12
+
- Removes all selectedNetworkClientId usages by finding network clients via srcChainId ([#6996](https://github.com/MetaMask/core/pull/6996))
0 commit comments