Add "Change Password" functionality #177
Merged
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.
Abstract
This PR adds the ability for users to change their MPW encryption password at runtime; this button is located in the Wallet Settings, and is only shown when a wallet is locally encrypted in the database already (i.e: immediately after encrypting, the setting becomes available).
This PR re-uses the "Encrypt Wallet" code and UI flow, by a hidden "Current Password" input that reveals itself when necessary, and updating the modal title accordingly.
In the backend, it essentially is just calling 'encryptWallet' and overwriting the existing wallet
encWif
in the database.Testing
To test this PR, it's suggested to attempt these user flows, or variations of these:
Settings -> Wallet
, and Change Password.Feel free to try various testing methods: like changing your password multiple times, or trying to break the "Change Password" UI or functionality.
What does this PR address?
It allows users to finally change their MPW password, which previously, was unchangeable and permanent.
What features or improvements were added?
It adds a simple "Change Password" button to the Wallet Settings.
How does this benefit users?
Sometimes, users just want to change their password: perhaps they dislike the old one, would like a more complex/simple one, or they just routinely change passwords for security, this fits all of such usecases.