This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Keep User Logged In: Export key for encrypted key login #152
Keep User Logged In: Export key for encrypted key login #152
Changes from all commits
c25efe0
e239774
3c4e88d
eb8b357
aed7c3b
97ebd51
4d62780
fb461b5
1ff9e9d
b200969
52605f9
645ecd9
8e8e771
6e840cc
76d1adf
ef8dc4f
2dafa98
751fbfe
db4dc1d
e141b84
2a2e53b
0ace5f5
a5fe1dc
e28b476
7cd4d40
dc73e95
a321458
e594170
1093c17
76c0123
72145ba
aedfbe1
46f39db
76aa90d
5ef3bb6
3694ce5
4769f37
a4e01d0
37af169
4021e0c
81cd50a
12d8365
a7a7bc7
2d4b51d
78412cb
9a0343e
0071c04
7907b34
9178496
88299ef
3848e04
c137eae
83e0973
a5fe207
aacd2a1
ad5169d
cc7ff86
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
What's the difference between holding something in memory store vs class field? Why do we use/need both?
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.
Putting the
encryptionKey
in the memory store bubbles it up to the extension, which allows us to store it in session storage each time it changes: https://github.com/MetaMask/metamask-extension/pull/15558/files#diff-6fbff2cfe97ac01b77296ef2122c7e0a5b3ff6a84b584b4d1a87482f35eea3d6R3941There 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.
We don't generally have a use for public class fields; the password field should be private. That's a change I was going to make in a separate PR at some point; it would be a breaking change because
@metamask/controllers
uses this field today, but it does not need to.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) This if structure looks similar across both functions. I'd be tempted to create a function that accepts state and descriptively named functions as reactions to certain states.