Skip to content

Commit 2678d3d

Browse files
committed
Show old-fee, increase a new-fee in Qt fee bumper confirmation dialog
1 parent 2ec911f commit 2678d3d

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

src/qt/walletmodel.cpp

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -722,9 +722,24 @@ bool WalletModel::bumpFee(uint256 hash)
722722
}
723723

724724
// allow a user based fee verification
725-
QString questionString = tr("Do you want to increase the fee from %1 to %2").arg(
726-
BitcoinUnits::formatHtmlWithUnit(getOptionsModel()->getDisplayUnit(), feeBump->getOldFee()),
727-
BitcoinUnits::formatHtmlWithUnit(getOptionsModel()->getDisplayUnit(), feeBump->getNewFee()));
725+
QString questionString = tr("Do you want to increase the fee?");
726+
questionString.append("<br />");
727+
CAmount oldFee = feeBump->getOldFee();
728+
CAmount newFee = feeBump->getNewFee();
729+
questionString.append("<table style=\"text-align: left;\">");
730+
questionString.append("<tr><td>");
731+
questionString.append(tr("Current fee:"));
732+
questionString.append("</td><td>");
733+
questionString.append(BitcoinUnits::formatHtmlWithUnit(getOptionsModel()->getDisplayUnit(), oldFee));
734+
questionString.append("</td></tr><tr><td>");
735+
questionString.append(tr("Increase:"));
736+
questionString.append("</td><td>");
737+
questionString.append(BitcoinUnits::formatHtmlWithUnit(getOptionsModel()->getDisplayUnit(), newFee - oldFee));
738+
questionString.append("</td></tr><tr><td>");
739+
questionString.append(tr("New fee:"));
740+
questionString.append("</td><td>");
741+
questionString.append(BitcoinUnits::formatHtmlWithUnit(getOptionsModel()->getDisplayUnit(), newFee));
742+
questionString.append("</td></tr></table>");
728743
SendConfirmationDialog confirmationDialog(tr("Confirm fee bump"), questionString);
729744
confirmationDialog.exec();
730745
QMessageBox::StandardButton retval = (QMessageBox::StandardButton)confirmationDialog.result();

0 commit comments

Comments
 (0)