-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update @metamask/controllers
to v33
#16493
Conversation
5967b07
to
0123ab2
Compare
@@ -345,14 +345,14 @@ export default class MetamaskController extends EventEmitter { | |||
this.assetsContractController.getERC1155TokenURI.bind( | |||
this.assetsContractController, | |||
), | |||
onCollectibleAdded: ({ address, symbol, tokenId, standard, source }) => | |||
onNftAdded: ({ address, symbol, tokenId, standard, source }) => | |||
this.metaMetricsController.trackEvent({ | |||
event: EVENT_NAMES.NFT_ADDED, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Gudahtt can you change the event name from EVENT_NAMES.NFT_ADDED
to EVENT_NAMES.TOKEN_ADDED
? Despite NFT_ADDED
being defined in constants/metametrics.js
we've never actually used it yet and this would be the preferred way. (ie one event capturing the generalized activity and specific properties to split it out if needed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds reasonable! I might do this in a separate PR though, it doesn't seem directly related to the controllers update. This code is pre-existing (possibly still behind a build flag)
The controllers package has been updated to v33. The only breaking change in this release was to rename the term "collectible" to "NFT" wherever it appeared in the API. Changes in this PR have been kept minimal; additional renaming can be done in separate PRs. This PR only updates the controller names, controller state, controller methods, and any direct references to these things. NFTs are still called "collectibles" in most places.
e2f4ae6
to
c1bbb82
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Tested functionality and migration. All looks good!
The controllers package has been updated to v33. The only breaking change in this release was to rename the term "collectible" to "NFT" wherever it appeared in the API.
Changes in this PR have been kept minimal; additional renaming can be done in separate PRs. This PR only updates the controller names, controller state, controller methods, and any direct references to these things. NFTs are still called "collectibles" in most places.
Manual Testing Steps
To test the migration, you can setup a wallet using a build from
develop
, then switch to a build on this branch. You can compare the wallet state before and after to ensure the migration was correctly applied.Aside from the migration, there are functional changes, so any standard regression testing steps would apply. Maybe pay special attention to any NFT-related functionality though.
Pre-merge author checklist
Pre-merge reviewer checklist
If further QA is required (e.g. new feature, complex testing steps, large refactor), add the
Extension QA Board
label.In this case, a QA Engineer approval will be be required.