qt: Add option to (not) spend unconfirmed change
- Add a wallet tab to options dialog - Move fee setting to wallet tab - Add new setting to set -nospendzeroconfchange from UI
This commit is contained in:
@@ -76,6 +76,11 @@ void OptionsModel::Init()
|
||||
nTransactionFee = settings.value("nTransactionFee").toLongLong(); // if -paytxfee is set, this will be overridden later in init.cpp
|
||||
if (mapArgs.count("-paytxfee"))
|
||||
strOverriddenByCommandLine += "-paytxfee ";
|
||||
|
||||
if (!settings.contains("bSpendZeroConfChange"))
|
||||
settings.setValue("bSpendZeroConfChange", true);
|
||||
if (!SoftSetBoolArg("-spendzeroconfchange", settings.value("bSpendZeroConfChange").toBool()))
|
||||
strOverriddenByCommandLine += "-spendzeroconfchange ";
|
||||
#endif
|
||||
|
||||
if (!settings.contains("nDatabaseCache"))
|
||||
@@ -184,6 +189,8 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
|
||||
// Todo: Consider to revert back to use just nTransactionFee here, if we don't want
|
||||
// -paytxfee to update our QSettings!
|
||||
return settings.value("nTransactionFee");
|
||||
case SpendZeroConfChange:
|
||||
return settings.value("bSpendZeroConfChange");
|
||||
#endif
|
||||
case DisplayUnit:
|
||||
return nDisplayUnit;
|
||||
@@ -274,6 +281,12 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
|
||||
settings.setValue("nTransactionFee", (qint64)nTransactionFee);
|
||||
emit transactionFeeChanged(nTransactionFee);
|
||||
break;
|
||||
case SpendZeroConfChange:
|
||||
if (settings.value("bSpendZeroConfChange") != value) {
|
||||
settings.setValue("bSpendZeroConfChange", value);
|
||||
setRestartRequired(true);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case DisplayUnit:
|
||||
nDisplayUnit = value.toInt();
|
||||
|
||||
Reference in New Issue
Block a user