-
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
Use importAccountWithStrategy
from core KeyringController
#19815
Conversation
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. |
Removed dependencies detected. Learn more about Socket for GitHub ↗︎ 🚮 Removed packages: [email protected] |
Builds ready [66e876e]
Page Load Metrics (1752 ± 68 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Codecov Report
@@ Coverage Diff @@
## develop #19815 +/- ##
===========================================
- Coverage 68.66% 68.63% -0.03%
===========================================
Files 990 989 -1
Lines 38274 38227 -47
Branches 10260 10256 -4
===========================================
- Hits 26279 26235 -44
+ Misses 11995 11992 -3
|
c65c6b9
to
2d584d7
Compare
Depends on #19659 |
95313e3
to
1567ae0
Compare
66e876e
to
63f2266
Compare
@metamaskbot update-policies |
63f2266
to
7c6a29c
Compare
Policies updated |
Builds ready [b593868]
Page Load Metrics (1560 ± 53 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
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.
Looks good!
b593868
to
ba0ecc6
Compare
@metamaskbot update-policies |
Policies updated |
79d7255
to
af5ae69
Compare
Rebased and resolved |
Builds ready [af5ae69]
Page Load Metrics (2687 ± 163 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
af5ae69
to
ec16bf0
Compare
Builds ready [ec16bf0]
Page Load Metrics (1601 ± 42 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
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!
@mikesposito Looks like there are conflicts again :( |
ec16bf0
to
c4d7e34
Compare
@metamaskbot update-policies |
Policies updated |
Builds ready [72e8f62]
Page Load Metrics (1572 ± 42 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
72e8f62
to
b5730db
Compare
Builds ready [b5730db]
Page Load Metrics (1485 ± 42 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
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!
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.
One nit, but looks good regardless.
@@ -172,14 +172,14 @@ describe('MetaMaskController', function () { | |||
|
|||
await metamaskController.createNewVaultAndKeychain('test@123'); | |||
await Promise.all([ | |||
metamaskController.importAccountWithStrategy('Private Key', [ | |||
metamaskController.importAccountWithStrategy('privateKey', [ |
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.
Nit: It might be nice if we can import an enum and use that here (and other places) so we can see the significance of this value. Not a big deal if that's not doable though.
Explanation
With this PR we start using the
importAccountWithStrategy
method from coreKeyringController
instead of callingEthKeyringController
directly.As strategies keys are different on
KeyringController
, they have been changed on the extension code and tests, to match the new ones.AccountImportStrategy
enum from core forimportAccountWithStrategy
#18763importedAccountAddress
return object #18764importAccountWithStrategy
#18765Screenshots/Screencaps
Before
After
Manual Testing Steps
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.