]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
Send: warn on high fee
authortobtoht <thotbot@protonmail.com>
Thu, 23 Jun 2022 15:14:06 +0000 (17:14 +0200)
committertobtoht <thotbot@protonmail.com>
Thu, 23 Jun 2022 15:14:06 +0000 (17:14 +0200)
src/dialog/TxConfDialog.cpp

index b32a421173f6a925337a75d9cdbe73521c8a2acf..c9cb1a939fd971fa29f8216e03bd3f5de251336f 100644 (file)
@@ -72,6 +72,11 @@ TxConfDialog::TxConfDialog(QSharedPointer<AppContext> ctx, PendingTransaction *t
         ui->label_address->setToolTip("Wallet change/primary address");
     }
 
+    if (tx->fee() > WalletManager::amountFromDouble(0.01)) {
+        ui->label_fee->setStyleSheet(ColorScheme::RED.asStylesheet(true));
+        ui->label_fee->setToolTip("Unrealistic fee. You may be connected to a malicious node.");
+    }
+
     ui->buttonBox->button(QDialogButtonBox::Ok)->setText("Send");
 
     connect(ui->btn_Advanced, &QPushButton::clicked, this, &TxConfDialog::setShowAdvanced);