gui
gui copied to clipboard
Bugfix on TransactionsView - Disable if privacy mode is set during wallet selection
Currenlty on master, when the "mask values" checkbox is ticked if the user selects a different wallet, the history action is enable and if the user clicks on it can see all the transactions in the transaction view.
This PR fixes it.
Note for maintainers: this needs to be backported to 25.x and 26.x.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviews
See the guideline for information on the review process.
| Type | Reviewers |
|---|---|
| Stale ACK | alfonsoromanz |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #733 (Deniability - a tool to automatically improve coin ownership privacy by denavila)
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.
This feels like the wrong place to fix it. Why not inside
setWalletActionsEnabled(or whatever is enabling it to begin with)?
Yeah, it makes more sense, I'll rework it. Thanks!
historyAction->setEnabled(enabled && !isPrivacyModeActivated());
~~Just replacing the operator with || (e.g. when the user closes all wallets, all tabs will be disabled except for Transactions).~~
This one-line change works without anything else:
https://github.com/bitcoin-core/gui/pull/815#pullrequestreview-2072577992
This one-line change works without anything else:
Sorry, I made another mistake, thanks for double checking.
To other reviewers: please hold on till next push, thanks.
@pablomartin4btc Did you consider https://github.com/bitcoinknots/bitcoin/issues/83?
@pablomartin4btc Did you consider bitcoinknots/bitcoin#83?
Yeah, in fact the "switch to Overview" tab when changing/ selecting wallets, was introduced in #718, I can fix it here in a 2nd. commit which will do soon.
@pablomartin4btc
... was introduced in #718...
Sure about PR number? ('cause there is no such a number in this repo)
@pablomartin4btc
... was introduced in #718...
Sure about PR number? ('cause there is no such a number in this repo)
oh! my bad.. a typo there... how lucky! I'll play the lottery with that one today... I meant #708, I think it's the only place related to the "mask value" where I switched to the overview tab when the mask value checkbox on the menu is ticked but still need to check it.
@hebasto, I couldn't reproduce the issue described in https://github.com/bitcoinknots/bitcoin/issues/83, trying both master and this PR, also checked the fix in knots which is similar to this PR code change. It would be good to know what was the state of the "mask value" during the use case described in https://github.com/bitcoinknots/bitcoin/issues/83, the only thing I can think of it's that the issue is the same one described above on this PR but when that happens loading a second wallet would disable the Transactions view tab so it can't be selected. Perhaps @luke-jr can describe the steps to reproduce it.
@hebasto, the issue mentioned in https://github.com/bitcoinknots/bitcoin/issues/83 is fixed by this PR.
I've done a bit of investigation and the problem (in master, not on this PR) was not "switching" between wallets (selecting another wallet from the combo box won't show the overview page while the user is landing on the transactions tab), but when the user opens another wallet (which hasn't been loaded before) and the current wallet view is on the transactions/ history tab, then the system sets the overview page as a "default view" lets say (the problematic call has been removed from this PR and it was introduced by #708 originally).