From 4df615509fc8ead8690d7c61ee97b9356743c8fa Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Wed, 14 Nov 2018 10:19:45 -0800 Subject: [PATCH] #48 - Show warning when using non-default fee --- src/confirm.ui | 13 +++++++++++++ src/sendtab.cpp | 7 +++++++ 2 files changed, 20 insertions(+) diff --git a/src/confirm.ui b/src/confirm.ui index 2528d62..0d4653b 100644 --- a/src/confirm.ui +++ b/src/confirm.ui @@ -146,6 +146,19 @@ + + + + color: red; + + + You are using a custom fee. Since fees are publically visible, you are giving up some privacy. Please use this only if you know what you are doing! + + + true + + + diff --git a/src/sendtab.cpp b/src/sendtab.cpp index b97a899..174241a 100644 --- a/src/sendtab.cpp +++ b/src/sendtab.cpp @@ -490,6 +490,13 @@ bool MainWindow::confirmTx(Tx tx) { minerFeeUSD->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); confirm.gridLayout->addWidget(minerFeeUSD, i, 2, 1, 1); minerFeeUSD->setText(Settings::getUSDFormat(tx.fee)); + + if (tx.fee == Settings::getMinerFee()) { + // Default fee + confirm.warningLabel->setVisible(false); + } else { + confirm.warningLabel->setVisible(true); + } } // And FromAddress in the confirm dialog