Skip to content

Commit 927f4ff

Browse files
committed
GUI: Receive: Remove option to reuse a previous address
This was justified by the need to "resent" an invoice, but now that we have the request history, that need should be gone.
1 parent 3cd836c commit 927f4ff

File tree

2 files changed

+4
-40
lines changed

2 files changed

+4
-40
lines changed

src/qt/forms/receivecoinsdialog.ui

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,6 @@
2828
<layout class="QVBoxLayout" name="verticalLayout_3">
2929
<item>
3030
<layout class="QGridLayout" name="gridLayout">
31-
<item row="7" column="2">
32-
<widget class="QCheckBox" name="reuseAddress">
33-
<property name="toolTip">
34-
<string>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</string>
35-
</property>
36-
<property name="text">
37-
<string>R&amp;euse an existing receiving address (not recommended)</string>
38-
</property>
39-
</widget>
40-
</item>
41-
<item row="7" column="0">
42-
<widget class="QLabel" name="label_4">
43-
<property name="text">
44-
<string/>
45-
</property>
46-
</widget>
47-
</item>
4831
<item row="6" column="0">
4932
<widget class="QLabel" name="label_3">
5033
<property name="toolTip">
@@ -127,7 +110,7 @@
127110
</property>
128111
</widget>
129112
</item>
130-
<item row="8" column="2">
113+
<item row="7" column="2">
131114
<layout class="QHBoxLayout" name="horizontalLayout">
132115
<item>
133116
<widget class="QPushButton" name="receiveButton">
@@ -184,7 +167,7 @@
184167
</item>
185168
</layout>
186169
</item>
187-
<item row="8" column="0">
170+
<item row="7" column="0">
188171
<widget class="QLabel" name="label_7">
189172
<property name="text">
190173
<string/>
@@ -324,7 +307,6 @@
324307
<tabstop>reqLabel</tabstop>
325308
<tabstop>reqAmount</tabstop>
326309
<tabstop>reqMessage</tabstop>
327-
<tabstop>reuseAddress</tabstop>
328310
<tabstop>receiveButton</tabstop>
329311
<tabstop>clearButton</tabstop>
330312
<tabstop>recentRequestsView</tabstop>

src/qt/receivecoinsdialog.cpp

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ void ReceiveCoinsDialog::clear()
101101
ui->reqAmount->clear();
102102
ui->reqLabel->setText("");
103103
ui->reqMessage->setText("");
104-
ui->reuseAddress->setChecked(false);
105104
updateDisplayUnit();
106105
}
107106

@@ -130,25 +129,8 @@ void ReceiveCoinsDialog::on_receiveButton_clicked()
130129

131130
QString address;
132131
QString label = ui->reqLabel->text();
133-
if(ui->reuseAddress->isChecked())
134-
{
135-
/* Choose existing receiving address */
136-
AddressBookPage dlg(platformStyle, AddressBookPage::ForSelection, AddressBookPage::ReceivingTab, this);
137-
dlg.setModel(model->getAddressTableModel());
138-
if(dlg.exec())
139-
{
140-
address = dlg.getReturnValue();
141-
if(label.isEmpty()) /* If no label provided, use the previously used label */
142-
{
143-
label = model->getAddressTableModel()->labelForAddress(address);
144-
}
145-
} else {
146-
return;
147-
}
148-
} else {
149-
/* Generate new receiving address */
150-
address = model->getAddressTableModel()->addRow(AddressTableModel::Receive, label, "");
151-
}
132+
/* Generate new receiving address */
133+
address = model->getAddressTableModel()->addRow(AddressTableModel::Receive, label, "");
152134
SendCoinsRecipient info(address, label,
153135
ui->reqAmount->value(), ui->reqMessage->text());
154136
ReceiveRequestDialog *dialog = new ReceiveRequestDialog(this);

0 commit comments

Comments
 (0)