[Qt] migrate old fee slider value to new dropbown
Always round up (conservative)
This commit is contained in:
parent
bc1be90e37
commit
2aef1f1829
1 changed files with 7 additions and 0 deletions
|
@ -199,6 +199,13 @@ void SendCoinsDialog::setModel(WalletModel *_model)
|
||||||
|
|
||||||
// set the smartfee-sliders default value (wallets default conf.target or last stored value)
|
// set the smartfee-sliders default value (wallets default conf.target or last stored value)
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
if (settings.value("nSmartFeeSliderPosition").toInt() != 0) {
|
||||||
|
// migrate nSmartFeeSliderPosition to nConfTarget
|
||||||
|
// nConfTarget is available since 0.15 (replaced nSmartFeeSliderPosition)
|
||||||
|
int nConfirmTarget = 25 - settings.value("nSmartFeeSliderPosition").toInt(); // 25 == old slider range
|
||||||
|
settings.setValue("nConfTarget", nConfirmTarget);
|
||||||
|
settings.remove("nSmartFeeSliderPosition");
|
||||||
|
}
|
||||||
if (settings.value("nConfTarget").toInt() == 0)
|
if (settings.value("nConfTarget").toInt() == 0)
|
||||||
ui->confTargetSelector->setCurrentIndex(getIndexForConfTarget(model->getDefaultConfirmTarget()));
|
ui->confTargetSelector->setCurrentIndex(getIndexForConfTarget(model->getDefaultConfirmTarget()));
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue