[Qt] Change RBF checkbox to reflect -walletrbf setting

Before this commit, the checkbox would always start off unchecked. After this
commit it will respect the -walletrbf setting (which is currently false by
default).
pull/9592/head
Russell Yanofsky 8 years ago
parent 838a58e7ca
commit c4e4792c53

@ -112,6 +112,7 @@ SendCoinsDialog::SendCoinsDialog(const PlatformStyle *_platformStyle, QWidget *p
ui->groupCustomFee->button((int)std::max(0, std::min(1, settings.value("nCustomFeeRadio").toInt())))->setChecked(true); ui->groupCustomFee->button((int)std::max(0, std::min(1, settings.value("nCustomFeeRadio").toInt())))->setChecked(true);
ui->customFee->setValue(settings.value("nTransactionFee").toLongLong()); ui->customFee->setValue(settings.value("nTransactionFee").toLongLong());
ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool()); ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool());
ui->optInRBF->setCheckState(model->getDefaultWalletRbf() ? Qt::Checked : Qt::Unchecked);
minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool()); minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool());
} }

@ -706,3 +706,8 @@ int WalletModel::getDefaultConfirmTarget() const
{ {
return nTxConfirmTarget; return nTxConfirmTarget;
} }
bool WalletModel::getDefaultWalletRbf() const
{
return fWalletRbf;
}

@ -213,6 +213,8 @@ public:
int getDefaultConfirmTarget() const; int getDefaultConfirmTarget() const;
bool getDefaultWalletRbf() const;
private: private:
CWallet *wallet; CWallet *wallet;
bool fHaveWatchOnly; bool fHaveWatchOnly;

Loading…
Cancel
Save