Changeset View
Changeset View
Standalone View
Standalone View
src/qt/sendcoinsdialog.cpp
Show First 20 Lines • Show All 667 Lines • ▼ Show 20 Lines | if (ui->radioSmartFee->isChecked()) { | ||||
payTxFee = CFeeRate(Amount(0)); | payTxFee = CFeeRate(Amount(0)); | ||||
// set nMinimumTotalFee to 0 to not accidentally pay a custom fee | // set nMinimumTotalFee to 0 to not accidentally pay a custom fee | ||||
CoinControlDialog::coinControl->nMinimumTotalFee = Amount(0); | CoinControlDialog::coinControl->nMinimumTotalFee = Amount(0); | ||||
// show the estimated required time for confirmation | // show the estimated required time for confirmation | ||||
ui->confirmationTargetLabel->setText( | ui->confirmationTargetLabel->setText( | ||||
GUIUtil::formatDurationStr( | GUIUtil::formatDurationStr( | ||||
nConfirmTarget * Params().GetConsensus().nPowTargetSpacing) + | nConfirmTarget * | ||||
model->getChainParams().GetConsensus().nPowTargetSpacing) + | |||||
" / " + tr("%n block(s)", "", nConfirmTarget)); | " / " + tr("%n block(s)", "", nConfirmTarget)); | ||||
} else { | } else { | ||||
payTxFee = CFeeRate(Amount(ui->customFee->value())); | payTxFee = CFeeRate(Amount(ui->customFee->value())); | ||||
// if user has selected to set a minimum absolute fee, pass the value to | // if user has selected to set a minimum absolute fee, pass the value to | ||||
// coincontrol | // coincontrol | ||||
// set nMinimumTotalFee to 0 in case of user has selected that the fee | // set nMinimumTotalFee to 0 in case of user has selected that the fee | ||||
// is per KB | // is per KB | ||||
▲ Show 20 Lines • Show All 142 Lines • ▼ Show 20 Lines | |||||
// Coin Control: custom change address changed | // Coin Control: custom change address changed | ||||
void SendCoinsDialog::coinControlChangeEdited(const QString &text) { | void SendCoinsDialog::coinControlChangeEdited(const QString &text) { | ||||
if (model && model->getAddressTableModel()) { | if (model && model->getAddressTableModel()) { | ||||
// Default to no change address until verified | // Default to no change address until verified | ||||
CoinControlDialog::coinControl->destChange = CNoDestination(); | CoinControlDialog::coinControl->destChange = CNoDestination(); | ||||
ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}"); | ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}"); | ||||
const CTxDestination dest = DecodeDestination(text.toStdString()); | const CTxDestination dest = | ||||
DecodeDestination(text.toStdString(), model->getChainParams()); | |||||
if (text.isEmpty()) { | if (text.isEmpty()) { | ||||
// Nothing entered | // Nothing entered | ||||
ui->labelCoinControlChangeLabel->setText(""); | ui->labelCoinControlChangeLabel->setText(""); | ||||
} else if (!IsValidDestination(dest)) { | } else if (!IsValidDestination(dest)) { | ||||
// Invalid address | // Invalid address | ||||
ui->labelCoinControlChangeLabel->setText( | ui->labelCoinControlChangeLabel->setText( | ||||
tr("Warning: Invalid Bitcoin address")); | tr("Warning: Invalid Bitcoin address")); | ||||
▲ Show 20 Lines • Show All 127 Lines • Show Last 20 Lines |