MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / getDuplicateAddressWarning

Method getDuplicateAddressWarning

src/qt/editaddressdialog.cpp:136–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

labelForAddressMethod · 0.80
purposeForAddressMethod · 0.80

Tested by

no test coverage detected