Commit 654158c
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- packages
- assets-controllers
- src
- preferences-controller
- src
7 files changed
+235
-187
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 28 | | |
33 | 29 | | |
34 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
| |||
0 commit comments