You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Utils::showError(this, "Unable to add contact", "Name can not be an address", {}, "add_contact");
return;
}
if (!addressValid && !nameIsAddress) {
Utils::showError(this, "Unable to add contact", "Invalid address", {"Use 'Tools -> Address checker' to check if the address is valid."}, "add_contact");
return;
}
if (!addressValid && nameIsAddress) {
// User accidentally swapped name and address, allow it
std::swap(address, name);
}
auto& rows = m_wallet->addressBook()->getRows();
for (int i = 0; i < rows.size(); i++) {
const ContactRow& row = rows[i];
if (address == row.address) {
Utils::showError(this, "Unable to add contact", "Address already exists in contacts", {}, "add_contact");