Skip to content

Bugfix on TransactionsView - Disable if privacy mode is set during wallet selection#815

Merged
hebasto merged 1 commit intobitcoin-core:masterfrom
pablomartin4btc:gui-disable-mask-values-and-tx-view-if-no-wallet-selected
Mar 22, 2026
Merged

Bugfix on TransactionsView - Disable if privacy mode is set during wallet selection#815
hebasto merged 1 commit intobitcoin-core:masterfrom
pablomartin4btc:gui-disable-mask-values-and-tx-view-if-no-wallet-selected

Conversation

@pablomartin4btc
Copy link
Copy Markdown
Contributor

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.

Peek 2024-04-09 17-37

This PR fixes it.

Peek 2024-04-09 17-45

Note for maintainers: this needs to be backported to 25.x and 26.x.

@DrahtBot
Copy link
Copy Markdown
Contributor

DrahtBot commented Apr 9, 2024

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
ACK hebasto
Stale ACK alfonsoromanz

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #898 (Add coins (UTXOs) tab and makes it view-only by apogio)

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.

Copy link
Copy Markdown
Contributor

@alfonsoromanz alfonsoromanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested ACK d3da502

Copy link
Copy Markdown
Member

@luke-jr luke-jr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like the wrong place to fix it. Why not inside setWalletActionsEnabled (or whatever is enabling it to begin with)?

@pablomartin4btc
Copy link
Copy Markdown
Contributor Author

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!

@pablomartin4btc pablomartin4btc force-pushed the gui-disable-mask-values-and-tx-view-if-no-wallet-selected branch from d3da502 to 6c3b027 Compare May 22, 2024 10:39
@pablomartin4btc
Copy link
Copy Markdown
Contributor Author

Updates:

Copy link
Copy Markdown
Member

@luke-jr luke-jr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure you can just modify the existing line in setWalletActionsEnabled to:

    historyAction->setEnabled(enabled && !isPrivacyModeActivated());

@pablomartin4btc
Copy link
Copy Markdown
Contributor Author

pablomartin4btc commented May 23, 2024

    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).

@pablomartin4btc pablomartin4btc force-pushed the gui-disable-mask-values-and-tx-view-if-no-wallet-selected branch from 6c3b027 to 6180086 Compare May 23, 2024 08:35
@pablomartin4btc
Copy link
Copy Markdown
Contributor Author

Updates:

@luke-jr
Copy link
Copy Markdown
Member

luke-jr commented May 23, 2024

This one-line change works without anything else:

#815 (review)

@pablomartin4btc
Copy link
Copy Markdown
Contributor Author

This one-line change works without anything else:

#815 (review)

Sorry, I made another mistake, thanks for double checking.

To other reviewers: please hold on till next push, thanks.

@pablomartin4btc pablomartin4btc force-pushed the gui-disable-mask-values-and-tx-view-if-no-wallet-selected branch from 6180086 to 260d6eb Compare May 24, 2024 11:03
@pablomartin4btc
Copy link
Copy Markdown
Contributor Author

Updates:

@hebasto
Copy link
Copy Markdown
Member

hebasto commented Jul 15, 2024

@pablomartin4btc Did you consider bitcoinknots/bitcoin#83?

@pablomartin4btc
Copy link
Copy Markdown
Contributor Author

@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.

@hebasto
Copy link
Copy Markdown
Member

hebasto commented Jul 15, 2024

@pablomartin4btc

... was introduced in #718...

Sure about PR number? ('cause there is no such a number in this repo)

@pablomartin4btc
Copy link
Copy Markdown
Contributor Author

@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.

@pablomartin4btc
Copy link
Copy Markdown
Contributor Author

@hebasto, I couldn't reproduce the issue described in bitcoinknots/bitcoin#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 bitcoinknots/bitcoin#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.

@pablomartin4btc
Copy link
Copy Markdown
Contributor Author

pablomartin4btc commented Jul 30, 2024

@hebasto, the issue mentioned in bitcoinknots/bitcoin#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).

@DrahtBot
Copy link
Copy Markdown
Contributor

🤔 There hasn't been much activity lately and the CI seems to be failing.

If no one reviewed the current pull request by commit hash, a rebase can be considered. While the CI failure may be a false positive, the CI hasn't been running for some time, so there may be a real issue hiding as well. A rebase triggers the latest CI and makes sure that no silent merge conflicts have snuck in.

Making sure that if the privacy mode is activaded during
the wallet selection, the transaction view is not shown.
@pablomartin4btc pablomartin4btc force-pushed the gui-disable-mask-values-and-tx-view-if-no-wallet-selected branch from 260d6eb to 0dc337f Compare January 15, 2025 18:56
@pablomartin4btc
Copy link
Copy Markdown
Contributor Author

Updates:

  • Rebased (fixed previous CI failure - ASan + LSan + UBSan... ).

@DrahtBot
Copy link
Copy Markdown
Contributor

DrahtBot commented Aug 4, 2025

There hasn't been much activity lately. What is the status here?

Finding reviewers may take time. However, if the patch is no longer relevant, please close this pull request. If the author lost interest or time to work on this, please close it and mark it 'Up for grabs' with the label, so that it can be picked up in the future.

Copy link
Copy Markdown
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 0dc337f, tested on Fedora 43.

I agree with this comment. Following this direction, further improvements to the m_mask_values_action connections could be made by switching to a lambda.

@DrahtBot DrahtBot requested a review from alfonsoromanz March 22, 2026 14:54
@hebasto hebasto merged commit 999c424 into bitcoin-core:master Mar 22, 2026
12 checks passed
@fanquake
Copy link
Copy Markdown
Member

fanquake commented Mar 22, 2026

Backported to 31.x in bitcoin/bitcoin#34800.

achow101 added a commit to bitcoin/bitcoin that referenced this pull request Mar 25, 2026
b241f3c doc: update example bitcoin conf for 31.0rc2 (fanquake)
718c31c doc: update manual pages for v31.0rc2 (fanquake)
a30e505 build: bump version to v31.0rc2 (fanquake)
ac13aca test: scale IPC mining wait timeouts by timeout_factor (Enoch Azariah)
39c8762 test: verify IPC error handling for invalid coinbase (Enoch Azariah)
6609473 test: move make_mining_ctx to ipc_util.py (Enoch Azariah)
acd7e3d test: verify createNewBlock wakes promptly when tip advances (Enoch Azariah)
e3d5716 test: Remove confusing assert_debug_log in wallet_reindex.py (MarcoFalke)
87d1691 wallet: feebumper, fix crash when combined bump fee is unavailable (furszy)
11b6992 wallet: fix amount computed as boolean in coin selection (furszy)
d171afa ci: Temporarily use clang in valgrind tasks (MarcoFalke)
198bc4d ci: Clarify why valgrind task has gui disabled (MarcoFalke)
6993aa1 test: Scale feature_dbcrash.py timeout with factor (MarcoFalke)
051afe9 depends: Remove no longer necessary `dsymutil` (Hennadii Stepanov)
3b79852 depends: Fix cross-compiling on macOS for Windows (Hennadii Stepanov)
e53c20d gui: Fix TransactionsView on setCurrentWallet (pablomartin4btc)
7118559 tests: applied PYTHON_GIL to the env for every test (kevkevinpal)
d9a5791 ci: Avoid intermittent Windows generate download failures (MarcoFalke)
335a098 kernel: acquire coinstats cursor and block info atomically (w0xlt)
e930c6d rpc: fix race condition in gettxoutsetinfo (w0xlt)
ca781e4 cmake: Migrate away from deprecated SQLite3 target (Daniel Pfeifer)
0689512 test: [refactor] Use verbosity=0 named arg (MarcoFalke)
8379f00 test: Fix intermittent issue in feature_assumeutxo.py (MarcoFalke)
72d6c88 test: Move event loop creation to network thread (MarcoFalke)
c7127f2 test: Use asyncio.SelectorEventLoop() over deprecated asyncio.WindowsSelectorEventLoopPolicy() (MarcoFalke)
a69f8c3 ci: Use arch-appropriate binaries in lint install (will)
e3383ac ci: check macos bundle structure and codesigning (fanquake)
ab37d3d macdeploy: use plugins dir to find plugins (fanquake)
bb9fcff macdeploy: subprocess out to zip rather than shutil.make_archive (fanquake)
d20ba02 build: Set AUTHOR_WARNING on warnings (MarcoFalke)
2724c39 guix: Make guix-clean less destructive (Hodlinator)
a28d78c test: use static methods and clarify comment in addr_relay (stratospher)
5642a2b test: protect outbound connection from eviction in getaddr_test (stratospher)
a3c1eda test: fix addr relay test silent pass and wrong peerinfo index (stratospher)
207087b ci: bump cirruslabs actions versions (will)
a74dfe3 lint: Temporarily revert to vulture==2.14 (MarcoFalke)
f7f7e68 ci: Bump GHA actions versions (MarcoFalke)
a3ffff0 depends: delete Boost extra files (fanquake)
9852bbd depends: disable Qt sbom generation (fanquake)

Pull request description:

  Backports:
  * #33144
  * #34451
  * #34589
  * #34727
  * #34750
  * #34755
  * #34776
  * #34787
  * #34802
  * #34814
  * #34815
  * #34820
  * #34852
  * #34832
  * #34848
  * #34850
  * #34857
  * #34859
  * #34869
  * #34870
  * #34878
  * #34888

  Gui:
  * bitcoin-core/gui#815

ACKs for top commit:
  Sjors:
    ACK b241f3c
  achow101:
    ACK b241f3c

Tree-SHA512: bb68f5b6e569781805c741d63a6ad6f955c1964d9186defa892936160e8444900f1e4175a1ef4fff268b655d664ddf0b914795ef554ea60cb23a054b080b4805
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants