Merge bitcoin-core/gui#815: Bugfix on TransactionsView - Disable if privacy mode is set during wallet selection

0dc337f73d gui: Fix TransactionsView on setCurrentWallet (pablomartin4btc)

Pull request description:

  <details>
  <summary>Currenlty on <code>master</code>, 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.</summary>

  ![Peek 2024-04-09 17-37](https://github.com/bitcoin-core/gui/assets/110166421/d8e2fdd1-aaa6-4506-acde-51fa45a74910)

  </details>
  <details>
  <summary>This PR fixes it.</summary>

  ![Peek 2024-04-09 17-45](https://github.com/bitcoin-core/gui/assets/110166421/78c30dc5-42a6-4829-981d-6b9aaa03f014)

  </details>

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

ACKs for top commit:
  hebasto:
    ACK 0dc337f73d, tested on Fedora 43.

Tree-SHA512: 54581546917f87b4c1db0ff1eaa1962ee6eb078285dbb205b4c8d027c3e350f3dc46409b376948c10e668f9487b7a5a70bab0dff5faf510deab1a54452f7f0e5
This commit is contained in:
Hennadii Stepanov
2026-03-22 19:41:04 +00:00

View File

@@ -796,9 +796,7 @@ void BitcoinGUI::addWallet(WalletModel* walletModel)
connect(wallet_view, &WalletView::encryptionStatusChanged, this, &BitcoinGUI::updateWalletStatus);
connect(wallet_view, &WalletView::incomingTransaction, this, &BitcoinGUI::incomingTransaction);
connect(this, &BitcoinGUI::setPrivacy, wallet_view, &WalletView::setPrivacy);
const bool privacy = isPrivacyModeActivated();
wallet_view->setPrivacy(privacy);
enableHistoryAction(privacy);
wallet_view->setPrivacy(isPrivacyModeActivated());
const QString display_name = walletModel->getDisplayName();
m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel));
}
@@ -857,7 +855,7 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled)
overviewAction->setEnabled(enabled);
sendCoinsAction->setEnabled(enabled);
receiveCoinsAction->setEnabled(enabled);
historyAction->setEnabled(enabled);
historyAction->setEnabled(enabled && !isPrivacyModeActivated());
encryptWalletAction->setEnabled(enabled);
backupWalletAction->setEnabled(enabled);
changePassphraseAction->setEnabled(enabled);