-
Notifications
You must be signed in to change notification settings - Fork 37
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
[Refactor] Clean up wallet related code #200
Conversation
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.
implemented the review and fixed the problem on opening |
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.
tACK 893afd2
Working as per tests
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.
tACK
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.
tACK ac66fcd
Tested every suggested Test area, tried new wallets, existing wallets, etc, not an issue.
This cleanup has gotten our wallet/key handling code in a much nicer state that I've been wanting for a while, really glad this was handled, on the way to a cleaner and more stable MPW! 🚀
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.
tACK I like the new wallet class
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.
tACK ac66fcd
Abstract
This is a continuation of the work started in #197 main changes are:
Masterkey
has the only role of internally generating addresses and keys without any context, all external information, for example number of generated addresses, map of known addresses, nAccount used in derivation path has been moved to theWallet
classWallet
instead of spread in all files is also a first step toward multi account system.getDerivationPath()
andgetMasterKey()
Wallet
class has been decoupled from GUINetwork
class takes now aWallet
object instead of aMasterkey
Overall, as you can see from the
git diff
, I think that this is a good clean up and from this point we should finally be able to build a goodWallet
class that will also manage UTXO, masternode, balance...Testing
Test all features related to wallet:
If any errors are found, the PR works unexpectedly, or you have viable suggestions to improve the UX or functionality of the PR, let me know!
For future contributions
While the clean up is almost completed there are still a few places that can be improved: for example
bitTrx.js
there is still a call towallet.getDerivationPath()
Masternode
class should also be refactored and incorporated with the newWallet
class