-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Migrate to new controller packages #16547
Conversation
`@metamask/controllers` is deprecated, and most of the controllers that lived here are now located in their own package ([1]). This commit replaces `@metamask/controllers` in `package.json` with references to these packages and updates `import` lines to match. [1]: MetaMask/core#831
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
||
# Test @metamask package publishing | ||
.npmrc |
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.
This is a temporary change and I can bring this out into a separate PR. For now, I've explained how this is used in the PR description. We want to gitignore it because if it's used for testing we don't want people's access tokens to end up in the repo.
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.
Well, I guess if we have the CircleCI config in this branch, we can have this here too since they're related.
package.json
Outdated
@@ -110,24 +110,35 @@ | |||
"@keystonehq/bc-ur-registry-eth": "^0.12.1", | |||
"@keystonehq/metamask-airgapped-keyring": "^0.6.1", | |||
"@material-ui/core": "^4.11.0", | |||
"@metamask/address-book-controller": "1.0.0-f2fa748", |
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.
The versions we are using here look a bit funky, but they're autogenerated based on this PR and are temporary until we are able to QA the new packages in both extension and mobile. Once we've done that, and before merging this PR, I'll replace them with "1.0.0".
@@ -27,6 +27,9 @@ export const GAS_LIMITS = { | |||
* These are already declared in @metamask/controllers but importing them from |
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.
I'm not sure if this comment will be true after this change. If there's no reason why it wouldn't be I can remove the TODO here and we can revisit this later.
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.
Nice catch
8fe18a4
to
cd9ea6e
Compare
Marking as |
Moving this back to draft so that we can continue to access the preview versions of the aforementioned packages within the GitHub Package Registry, but please feel free to review this! |
Builds ready [ea58338]
Page Load Metrics (2001 ± 101 ms)
Bundle size diffs [🚀 Bundle size reduced!]
highlights:storybook
|
Builds ready [2f7761c]
Page Load Metrics (2060 ± 126 ms)
Bundle size diffs [🚀 Bundle size reduced!]
highlights:storybook
|
The controller packages have been published! This is now ready for review. |
Builds ready [ca210aa]
Page Load Metrics (2202 ± 147 ms)
Bundle size diffs [🚀 Bundle size reduced!]
highlights:storybook
|
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. Built locally with no issues.
nevermind! Build fluke. Got it working. |
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.
Code changes LGTM. I tested some common user flows, but might be worth giving this a more thorough QA treatment before merge?
The PR looks good. I confirm it fixes the issues with 0 decimal tokens. I've QAd on Chrome, as on FireFox the extension is crashing (due to the FireFox bug spot a week ago, now fixed on develop). I only found this issue, but I cannot ensure it is due to this PR, nor how to reproduce it consistently. |
…troller-packages * origin/develop: (21 commits) Simplify MV3 initialization (#16559) Fix #15050 - MV3: Keep the user logged in when service worker restarts (#15558) Integrating snow into metamask (#15580) fix infura rpc detection (#16585) Remove callback from being saved in controller state (#16627) Icon house keeping updates (#16621) Fix bundle size diff message (#16576) avatar base component housekeeping (#16583) Disabled save button on add contact form if input fields are empty (#16233) Fix E2E chunking (#16653) fixed console warning for labelProps (#16629) Adding `FormTextField` component (#16497) Fix/16620/button href prop (#16633) Update to correct version Beta Changelog Fix version number Ensure prod beta build is created when merging to master (#16557) Beta: Update long logo to new imagery (#16505) BETA - Add beta banner to all screens (#16307) BETA - Update logo imagery (#16304) ...
Builds ready [ec2be79]
Page Load Metrics (2159 ± 113 ms)
Bundle size diffs [🚀 Bundle size reduced!]
highlights:storybook
|
Thanks @seaona ! I took a look at that issue, and it looks like it's functioning as expected, but with incorrect logging. I have brought this branch up-to-date with |
thank you @Gudahtt !! I've pulled the last changes and looking good on FF too |
Explanation
@metamask/controllers
is deprecated, and most of the controllers that lived here are now located in their own package. This commit replaces@metamask/controllers
inpackage.json
with references to these packages and updatesimport
lines to match.Manual Testing Steps
This is a behind-the-scenes change, and there should be no changes to existing functionality — everything should work as it does currently. I'm not sure what the best protocol to test these sorts of changes is (maybe run through the most common scenarios? test-dapp?)
Note that before this PR gets merged, preview versions of the new packages, which live on GitHub Packages, will be used. Without specially configuring NPM, these packages will not be accessible locally, and therefore you will not be able to run
yarn setup
. To get this working:.npmrc
in the root directory with the following content (note: this file is gitignored, so don't worry about it ending up in the repo):Now you should be able to run
yarn setup
, thenyarn start
, and load the extension locally.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.