Merge #9481: [Qt] Show more significant warning if we fall back to the default fee
7abe7bb
Qt/Send: Give fallback fee a reasonable indent (Luke Dashjr)3e4d7bf
Qt/Send: Figure a decent warning colour from theme (Luke Dashjr)c5adf8f
[Qt] Show more significant warning if we fall back to the default fee (Jonas Schnelli) Tree-SHA512: 9e85b5b398d7a49aaf6c42578d63750b1b7aa9cc9e84d008fe21d6c53f1ffe2fb69286a1a764e634ebca3286564615578eea0a1bc883e4b332be8306d9883d14
This commit is contained in:
commit
ce01e6226c
2 changed files with 29 additions and 0 deletions
|
@ -759,11 +759,33 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="fallbackFeeWarningLabel">
|
||||
<property name="toolTip">
|
||||
<string>Using the fallbackfee can result in sending a transaction that will take serval hours or days (or never) to confirm. Consider choosing your fee manually or wait until your have validated the complete chain.</string>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Warning: Fee estimation is currently not possible.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "txmempool.h"
|
||||
#include "wallet/wallet.h"
|
||||
|
||||
#include <QFontMetrics>
|
||||
#include <QMessageBox>
|
||||
#include <QScrollBar>
|
||||
#include <QSettings>
|
||||
|
@ -656,6 +657,11 @@ void SendCoinsDialog::updateSmartFeeLabel()
|
|||
std::max(CWallet::fallbackFee.GetFeePerK(), CWallet::GetRequiredFee(1000))) + "/kB");
|
||||
ui->labelSmartFee2->show(); // (Smart fee not initialized yet. This usually takes a few blocks...)
|
||||
ui->labelFeeEstimation->setText("");
|
||||
ui->fallbackFeeWarningLabel->setVisible(true);
|
||||
int lightness = ui->fallbackFeeWarningLabel->palette().color(QPalette::WindowText).lightness();
|
||||
QColor warning_colour(255 - (lightness / 5), 176 - (lightness / 3), 48 - (lightness / 14));
|
||||
ui->fallbackFeeWarningLabel->setStyleSheet("QLabel { color: " + warning_colour.name() + "; }");
|
||||
ui->fallbackFeeWarningLabel->setIndent(QFontMetrics(ui->fallbackFeeWarningLabel->font()).width("x"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -663,6 +669,7 @@ void SendCoinsDialog::updateSmartFeeLabel()
|
|||
std::max(feeRate.GetFeePerK(), CWallet::GetRequiredFee(1000))) + "/kB");
|
||||
ui->labelSmartFee2->hide();
|
||||
ui->labelFeeEstimation->setText(tr("Estimated to begin confirmation within %n block(s).", "", estimateFoundAtBlocks));
|
||||
ui->fallbackFeeWarningLabel->setVisible(false);
|
||||
}
|
||||
|
||||
updateFeeMinimizedLabel();
|
||||
|
|
Loading…
Reference in a new issue