From 260d6eb9272345d0e5ac8d130ef170e15bb46a8e Mon Sep 17 00:00:00 2001 From: pablomartin4btc Date: Tue, 9 Apr 2024 15:53:38 -0300 Subject: [PATCH] gui: Fix TransactionsView on setCurrentWallet Making sure that if the privacy mode is activaded during the wallet selection, the transaction view is not shown. --- src/qt/bitcoingui.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 3e177af53cd..7e35a74c225 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -731,9 +731,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)); } @@ -793,7 +791,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);