-
Notifications
You must be signed in to change notification settings - Fork 37.7k
wallet: Use defined purposes instead of inlining #26858
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
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
5c71192
to
4510c03
Compare
I don't think |
6845729
to
fe167bb
Compare
I moved the constants to
This should be a separate pull request in https://github.com/bitcoin-core/gui once this one is merged? |
I think it's fine to do those at the same time here. |
0300b5f
to
7ed198c
Compare
7ed198c
to
2670c92
Compare
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 don't think that we should continue adding wallet.h dependency on any GUI widget/view. It breaks the layers division structure.
The GUI should be as abstracted as possible from the wallet/node internals (this is why all the interfaces and models classes exist).
Would suggest to move the strings to a separate file, or at least to walletutil.h
so the required backend dependency is much smaller.
With wallet.h dependency the GUI can access the wallet context (calling the static function GetWallet()
), and with it access any wallet directly, breaking the entire requirement of requesting data through the different layers of the system (in other words, could by-pass the need to call the interface/model methods to get backend data which is not desirable for the system architecture).
Closing in favor of #27217. |
Based on this comment #26761 (comment).
This PR stores the currently inlined address purposes as constants and use them accordingly.