Skip to content

Commit 6180086

Browse files
gui: Fix TransactionsView on setCurrentWallet
Making sure that if the privacy mode is activaded during the wallet selection, the transaction view is not shown.
1 parent b2e531e commit 6180086

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: src/qt/bitcoingui.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -731,9 +731,7 @@ void BitcoinGUI::addWallet(WalletModel* walletModel)
731731
connect(wallet_view, &WalletView::encryptionStatusChanged, this, &BitcoinGUI::updateWalletStatus);
732732
connect(wallet_view, &WalletView::incomingTransaction, this, &BitcoinGUI::incomingTransaction);
733733
connect(this, &BitcoinGUI::setPrivacy, wallet_view, &WalletView::setPrivacy);
734-
const bool privacy = isPrivacyModeActivated();
735-
wallet_view->setPrivacy(privacy);
736-
enableHistoryAction(privacy);
734+
wallet_view->setPrivacy(isPrivacyModeActivated());
737735
const QString display_name = walletModel->getDisplayName();
738736
m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel));
739737
}
@@ -769,6 +767,7 @@ void BitcoinGUI::setCurrentWallet(WalletModel* wallet_model)
769767
break;
770768
}
771769
}
770+
setWalletActionsEnabled(true);
772771
updateWindowTitle();
773772
m_migrate_wallet_action->setEnabled(wallet_model->wallet().isLegacy());
774773
}
@@ -805,6 +804,9 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled)
805804
m_close_wallet_action->setEnabled(enabled);
806805
m_close_all_wallets_action->setEnabled(enabled);
807806
m_migrate_wallet_action->setEnabled(enabled);
807+
#ifdef ENABLE_WALLET
808+
enableHistoryAction(enabled || isPrivacyModeActivated());
809+
#endif // ENABLE_WALLET
808810
}
809811

810812
void BitcoinGUI::createTrayIcon()

0 commit comments

Comments
 (0)