Add addresses that we've sent to to the address book

This commit is contained in:
Wladimir J. van der Laan 2011-06-01 15:33:51 +02:00
parent 5d5990dc8f
commit c51f051257

View File

@ -106,6 +106,11 @@ ClientModel::StatusCode ClientModel::sendCoins(const QString &payTo, qint64 payA
return MiscError;
}
}
// Add addresses that we've sent to to the address book
std::string strAddress = payTo.toStdString();
CRITICAL_BLOCK(cs_mapAddressBook)
if (!mapAddressBook.count(strAddress))
SetAddressBookName(strAddress, "");
return OK;
}