Litecoin: Disable RBF UI
This commit is contained in:
parent
f496412ed8
commit
23c519fe2e
@ -1105,16 +1105,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="optInRBF">
|
||||
<property name="text">
|
||||
<string>Request Replace-By-Fee</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Indicates that the sender may wish to replace this transaction with a new one paying higher fees (prior to being confirmed).</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@ -176,15 +176,17 @@ void SendCoinsDialog::setModel(WalletModel *_model)
|
||||
connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(setMinimumFee()));
|
||||
connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(updateFeeSectionControls()));
|
||||
connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(coinControlUpdateLabels()));
|
||||
connect(ui->optInRBF, SIGNAL(stateChanged(int)), this, SLOT(updateSmartFeeLabel()));
|
||||
connect(ui->optInRBF, SIGNAL(stateChanged(int)), this, SLOT(coinControlUpdateLabels()));
|
||||
// Litecoin: Disabled RBF UI
|
||||
// connect(ui->optInRBF, SIGNAL(stateChanged(int)), this, SLOT(updateSmartFeeLabel()));
|
||||
// connect(ui->optInRBF, SIGNAL(stateChanged(int)), this, SLOT(coinControlUpdateLabels()));
|
||||
ui->customFee->setSingleStep(CWallet::GetRequiredFee(1000));
|
||||
updateFeeSectionControls();
|
||||
updateMinFeeLabel();
|
||||
updateSmartFeeLabel();
|
||||
|
||||
// set default rbf checkbox state
|
||||
ui->optInRBF->setCheckState(model->getDefaultWalletRbf() ? Qt::Checked : Qt::Unchecked);
|
||||
// Litecoin: Disabled RBF UI
|
||||
//ui->optInRBF->setCheckState(model->getDefaultWalletRbf() ? Qt::Checked : Qt::Unchecked);
|
||||
|
||||
// set the smartfee-sliders default value (wallets default conf.target or last stored value)
|
||||
QSettings settings;
|
||||
@ -342,12 +344,15 @@ void SendCoinsDialog::on_sendButton_clicked()
|
||||
questionString.append(QString("<span style='font-size:10pt;font-weight:normal;'><br />(=%2)</span>")
|
||||
.arg(alternativeUnits.join(" " + tr("or") + "<br />")));
|
||||
|
||||
/*
|
||||
Litecoin: Disabled RBF UI
|
||||
if (ui->optInRBF->isChecked())
|
||||
{
|
||||
questionString.append("<hr /><span>");
|
||||
questionString.append(tr("This transaction signals replaceability (optin-RBF)."));
|
||||
questionString.append("</span>");
|
||||
}
|
||||
*/
|
||||
|
||||
SendConfirmationDialog confirmationDialog(tr("Confirm send coins"),
|
||||
questionString.arg(formatted.join("<br />")), SEND_CONFIRM_DELAY, this);
|
||||
@ -647,7 +652,8 @@ void SendCoinsDialog::updateCoinControlState(CCoinControl& ctrl)
|
||||
// Avoid using global defaults when sending money from the GUI
|
||||
// Either custom fee will be used or if not selected, the confirmation target from dropdown box
|
||||
ctrl.m_confirm_target = getConfTargetForIndex(ui->confTargetSelector->currentIndex());
|
||||
ctrl.signalRbf = ui->optInRBF->isChecked();
|
||||
// Litecoin: Disabled RBF UI
|
||||
//ctrl.signalRbf = ui->optInRBF->isChecked();
|
||||
}
|
||||
|
||||
void SendCoinsDialog::updateSmartFeeLabel()
|
||||
|
||||
@ -63,10 +63,12 @@ uint256 SendCoins(CWallet& wallet, SendCoinsDialog& sendCoinsDialog, const CBitc
|
||||
SendCoinsEntry* entry = qobject_cast<SendCoinsEntry*>(entries->itemAt(0)->widget());
|
||||
entry->findChild<QValidatedLineEdit*>("payTo")->setText(QString::fromStdString(address.ToString()));
|
||||
entry->findChild<BitcoinAmountField*>("payAmount")->setValue(amount);
|
||||
/* Litecoin: Disabled RBF UI
|
||||
sendCoinsDialog.findChild<QFrame*>("frameFee")
|
||||
->findChild<QFrame*>("frameFeeSelection")
|
||||
->findChild<QCheckBox*>("optInRBF")
|
||||
->setCheckState(rbf ? Qt::Checked : Qt::Unchecked);
|
||||
*/
|
||||
uint256 txid;
|
||||
boost::signals2::scoped_connection c(wallet.NotifyTransactionChanged.connect([&txid](CWallet*, const uint256& hash, ChangeType status) {
|
||||
if (status == CT_NEW) txid = hash;
|
||||
@ -179,10 +181,11 @@ void TestSendCoins()
|
||||
QVERIFY(FindTx(*transactionTableModel, txid2).isValid());
|
||||
|
||||
// Call bumpfee. Test disabled, canceled, enabled, then failing cases.
|
||||
BumpFee(transactionView, txid1, true /* expect disabled */, "not BIP 125 replaceable" /* expected error */, false /* cancel */);
|
||||
BumpFee(transactionView, txid2, false /* expect disabled */, {} /* expected error */, true /* cancel */);
|
||||
BumpFee(transactionView, txid2, false /* expect disabled */, {} /* expected error */, false /* cancel */);
|
||||
BumpFee(transactionView, txid2, true /* expect disabled */, "already bumped" /* expected error */, false /* cancel */);
|
||||
// Litecoin: Disable BumpFee tests
|
||||
// BumpFee(transactionView, txid1, true /* expect disabled */, "not BIP 125 replaceable" /* expected error */, false /* cancel */);
|
||||
// BumpFee(transactionView, txid2, false /* expect disabled */, {} /* expected error */, true /* cancel */);
|
||||
// BumpFee(transactionView, txid2, false /* expect disabled */, {} /* expected error */, false /* cancel */);
|
||||
// BumpFee(transactionView, txid2, true /* expect disabled */, "already bumped" /* expected error */, false /* cancel */);
|
||||
|
||||
bitdb.Flush(true);
|
||||
bitdb.Reset();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user