Skip to content

Commit 654158c

Browse files
sahar-fehriamitabh94bergarces
authored
fix(assets): implement missing patch changes to nft and preferences controllers (#4774)
## Explanation This PR merges code that has been patched in the mobile client for over a year. ## References * Related to: mobile patch for preferences controller (https://github.com/MetaMask/metamask-mobile/blob/main/patches/%40metamask%2Bpreferences-controller%2B11.0.0.patch) ## Changelog <!-- If you're making any consumer-facing changes, list those changes here as if you were updating a changelog, using the template below as a guide. (CATEGORY is one of BREAKING, ADDED, CHANGED, DEPRECATED, REMOVED, or FIXED. For security-related issues, follow the Security Advisory process.) Please take care to name the exact pieces of the API you've added or changed (e.g. types, interfaces, functions, or methods). If there are any breaking changes, make sure to offer a solution for consumers to follow once they upgrade to the changes. Finally, if you're only making changes to development scripts or tests, you may replace the template below with "None". --> ### `@metamask/assets-controllers` - Rename `openSeaEnabled` to `displayNftMedia` in NftController - Remove `setApiKey` function from NftController since we do not use opensea anymore for NFT data - Remove `openSeaApiKey` from NftController ### `@metamask/preferences-controller` - Rename `openSeaEnabled` to `displayNftMedia` - Rename `setOpenSeaEnabled` to `setDisplayNftMedia` ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've highlighted breaking changes using the "BREAKING" category above as appropriate - [ ] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes --------- Co-authored-by: Amitabh Aggarwal <aggarwal.amitabh@gmail.com> Co-authored-by: Bernardo Garces Chapero <bernardo.chapero@consensys.net>
1 parent 6abc7a2 commit 654158c

File tree

7 files changed

+235
-187
lines changed

7 files changed

+235
-187
lines changed

eslint-warning-thresholds.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@
2525
"import-x/namespace": 9,
2626
"jest/no-conditional-in-test": 6
2727
},
28-
"packages/assets-controllers/src/NftController.ts": {
29-
"@typescript-eslint/prefer-readonly": 1,
30-
"jsdoc/check-tag-names": 46
31-
},
3228
"packages/assets-controllers/src/NftDetectionController.test.ts": {
3329
"import-x/namespace": 6,
3430
"import-x/order": 4

packages/assets-controllers/CHANGELOG.md

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

88
## [Unreleased]
99

10+
### Changed
11+
12+
- **BREAKING:** Rename `openSeaEnabled` to `displayNftMedia` in `NftController` ([#4774](https://github.com/MetaMask/core/pull/4774))
13+
- Ensure compatibility for extension preferences controller state
14+
- **BREAKING:** Remove `setApiKey` function and `openSeaApiKey` from `NftController` since opensea is not used anymore for NFT data ([#4774](https://github.com/MetaMask/core/pull/4774))
15+
1016
## [76.0.0]
1117

1218
### Added

0 commit comments

Comments
 (0)