MCPcopy Create free account
hub / github.com/ElementsProject/elements / getDuplicateAddressWarning

Method getDuplicateAddressWarning

src/qt/editaddressdialog.cpp:138–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138QString EditAddressDialog::getDuplicateAddressWarning() const
139{
140 QString dup_address = ui->addressEdit->text();
141 QString existing_label = model->labelForAddress(dup_address);
142 QString existing_purpose = model->purposeForAddress(dup_address);
143
144 if (existing_purpose == "receive" &&
145 (mode == NewSendingAddress || mode == EditSendingAddress)) {
146 return tr(
147 "Address \"%1\" already exists as a receiving address with label "
148 "\"%2\" and so cannot be added as a sending address."
149 ).arg(dup_address).arg(existing_label);
150 }
151 return tr(
152 "The entered address \"%1\" is already in the address book with "
153 "label \"%2\"."
154 ).arg(dup_address).arg(existing_label);
155}
156
157QString EditAddressDialog::getAddress() const
158{

Callers

nothing calls this directly

Calls 2

labelForAddressMethod · 0.80
purposeForAddressMethod · 0.80

Tested by

no test coverage detected