Skip to content

Commit f16ddbe

Browse files
sahar-fehrisalimtb
andauthored
chore: explicitly pass networkClientId for nftController (#5622)
## Explanation This PR is part of a larger effort to remove the global network selector. On this PR: * Removal of this.#chainId on the nftController * Removal of chainId from nftController constructor * Making the optional networkClientId in all functions a mandatory field UI integration: - extension: MetaMask/metamask-extension#31917 <!-- 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 * Fixes #5581 <!-- 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 --> ## Changelog <!-- THIS SECTION IS NO LONGER NEEDED. The process for updating changelogs has changed. Please consult the "Updating changelogs" section of the Contributing doc for more. --> ### `@metamask/assets-controllers` - **UPDATE:** Updated `NftController` and `NftDetectionController` to eliminate the dependency on the current chain. All functions that previously accepted networkClientId as an optional parameter now require it as a mandatory parameter ## 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 --------- Co-authored-by: salimtb <[email protected]>
1 parent d8bd629 commit f16ddbe

File tree

7 files changed

+1062
-615
lines changed

7 files changed

+1062
-615
lines changed

eslint-warning-thresholds.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,11 @@
3636
},
3737
"packages/assets-controllers/src/NftController.test.ts": {
3838
"import-x/namespace": 9,
39-
"import-x/order": 3,
40-
"jest/no-conditional-in-test": 8
39+
"jest/no-conditional-in-test": 6
4140
},
4241
"packages/assets-controllers/src/NftController.ts": {
4342
"@typescript-eslint/prefer-readonly": 1,
44-
"jsdoc/check-tag-names": 46,
45-
"jsdoc/tag-lines": 4
43+
"jsdoc/check-tag-names": 46
4644
},
4745
"packages/assets-controllers/src/NftDetectionController.test.ts": {
4846
"import-x/namespace": 6,

packages/assets-controllers/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- **BREAKING:** Update `NftController` and `NftDetectionController` to eliminate the dependency on the current chain ([#5622](https://github.com/MetaMask/core/pull/5622))
13+
- All functions that previously accepted networkClientId as an optional parameter now require it as a mandatory parameter.
14+
- **BREAKING:** Add `NetworkController:findNetworkClientIdByChainId` to allowed actions in `NftController` ([#5622](https://github.com/MetaMask/core/pull/5622))
15+
- **BREAKING:** Add `NetworkController:findNetworkClientIdByChainId` to allowed actions in `NftDetectionController` ([#5622](https://github.com/MetaMask/core/pull/5622))
16+
1017
## [67.0.0]
1118

1219
### Changed

0 commit comments

Comments
 (0)