Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/qt/guiutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,11 @@ bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out)
i->first.remove(0, 4);
fShouldReturnFalse = true;
}

if (i->first == "no125" && i->second == "1")
{
rv.no125 = true;
fShouldReturnFalse = false;
}
if (i->first == "label")
{
rv.label = i->second;
Expand Down
2 changes: 1 addition & 1 deletion src/qt/receivecoinsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ void ReceiveCoinsDialog::on_receiveButton_clicked()
/* Generate new receiving address */
address = model->getAddressTableModel()->addRow(AddressTableModel::Receive, label, "");
SendCoinsRecipient info(address, label,
ui->reqAmount->value(), ui->reqMessage->text());
ui->reqAmount->value(), ui->reqMessage->text(), false);
ReceiveRequestDialog *dialog = new ReceiveRequestDialog(this);
dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->setModel(model->getOptionsModel());
Expand Down
2 changes: 2 additions & 0 deletions src/qt/sendcoinsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,8 @@ void SendCoinsDialog::coinControlUpdateLabels()
CoinControlDialog::payAmounts.append(rcp.amount);
if (rcp.fSubtractFeeFromAmount)
CoinControlDialog::fSubtractFeeFromAmount = true;
if (rcp.no125)
ui->optInRBF->setCheckState(Qt::Unchecked);
}
}

Expand Down
10 changes: 8 additions & 2 deletions src/qt/walletmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class SendCoinsRecipient
{
public:
explicit SendCoinsRecipient() : amount(0), fSubtractFeeFromAmount(false), nVersion(SendCoinsRecipient::CURRENT_VERSION) { }
explicit SendCoinsRecipient(const QString &addr, const QString &_label, const CAmount& _amount, const QString &_message):
address(addr), label(_label), amount(_amount), message(_message), fSubtractFeeFromAmount(false), nVersion(SendCoinsRecipient::CURRENT_VERSION) {}
explicit SendCoinsRecipient(const QString &addr, const QString &_label, const CAmount& _amount, const QString &_message, const bool& _no125):
address(addr), label(_label), amount(_amount), message(_message), no125(_no125), fSubtractFeeFromAmount(false), nVersion(SendCoinsRecipient::CURRENT_VERSION) {}

// If from an unauthenticated payment request, this is used for storing
// the addresses, e.g. address-A<br />address-B<br />address-C.
Expand All @@ -51,6 +51,9 @@ class SendCoinsRecipient
CAmount amount;
// If from a payment request, this is used for storing the memo
QString message;

// Request that RBF should not be used
bool no125 = false;

// If from a payment request, paymentRequest.IsInitialized() will be true
PaymentRequestPlus paymentRequest;
Expand All @@ -69,6 +72,7 @@ class SendCoinsRecipient
std::string sAddress = address.toStdString();
std::string sLabel = label.toStdString();
std::string sMessage = message.toStdString();
std::string sNo125 = no125 ? "1" : "0";
std::string sPaymentRequest;
if (!ser_action.ForRead() && paymentRequest.IsInitialized())
paymentRequest.SerializeToString(&sPaymentRequest);
Expand All @@ -79,6 +83,7 @@ class SendCoinsRecipient
READWRITE(sLabel);
READWRITE(amount);
READWRITE(sMessage);
READWRITE(sNo125);
READWRITE(sPaymentRequest);
READWRITE(sAuthenticatedMerchant);

Expand All @@ -87,6 +92,7 @@ class SendCoinsRecipient
address = QString::fromStdString(sAddress);
label = QString::fromStdString(sLabel);
message = QString::fromStdString(sMessage);
no125 = sNo125=="1";
if (!sPaymentRequest.empty())
paymentRequest.parse(QByteArray::fromRawData(sPaymentRequest.data(), sPaymentRequest.size()));
authenticatedMerchant = QString::fromStdString(sAuthenticatedMerchant);
Expand Down