From c51f051257e678b3fd26efdd84a89329420c96f5 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 1 Jun 2011 15:33:51 +0200 Subject: [PATCH] Add addresses that we've sent to to the address book --- gui/src/clientmodel.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gui/src/clientmodel.cpp b/gui/src/clientmodel.cpp index 641c515ef99..97b5f44fe7e 100644 --- a/gui/src/clientmodel.cpp +++ b/gui/src/clientmodel.cpp @@ -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; }