Skip to content

Commit 5329b7d

Browse files
committed
fix(qt): avoid leaking balance and CJ info in GUI when in discreet mode
1 parent e8e6b92 commit 5329b7d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/qt/overviewpage.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ void OverviewPage::setPrivacy(bool privacy)
208208
m_privacy = privacy;
209209
if (m_balances.balance != -1) {
210210
setBalance(m_balances);
211+
coinJoinStatus(true);
211212
}
212213

213214
ui->listTransactions->setVisible(!m_privacy);
@@ -402,7 +403,10 @@ void OverviewPage::updateCoinJoinProgress()
402403

403404
if(nMaxToAnonymize == 0) return;
404405

405-
if (nMaxToAnonymize >= clientModel->coinJoinOptions().getAmount() * COIN) {
406+
if (m_privacy) {
407+
strAmountAndRounds = "#### DASH / ## Rounds";
408+
ui->labelAmountRounds->setToolTip("");
409+
} else if (nMaxToAnonymize >= clientModel->coinJoinOptions().getAmount() * COIN) {
406410
ui->labelAmountRounds->setToolTip(tr("Found enough compatible inputs to mix %1")
407411
.arg(strCoinJoinAmount));
408412
strCoinJoinAmount = strCoinJoinAmount.remove(strCoinJoinAmount.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1);
@@ -660,7 +664,7 @@ void OverviewPage::coinJoinStatus(bool fForce)
660664

661665
setWidgetsVisible(true);
662666

663-
ui->labelSubmittedDenom->setText(QString(walletModel->coinJoin()->getSessionDenoms().c_str()));
667+
ui->labelSubmittedDenom->setText(m_privacy ? "####" : QString(walletModel->coinJoin()->getSessionDenoms().c_str()));
664668
}
665669

666670
void OverviewPage::toggleCoinJoin(){

0 commit comments

Comments
 (0)