mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
Send: dialog redesign (automatically look up label for entered address)
This commit is contained in:
@@ -122,3 +122,19 @@ TransactionTableModel *WalletModel::getTransactionTableModel()
|
||||
{
|
||||
return transactionTableModel;
|
||||
}
|
||||
|
||||
/* Look up label for address in address book, if not found return empty string.
|
||||
*/
|
||||
QString WalletModel::labelForAddress(const QString &address) const
|
||||
{
|
||||
CRITICAL_BLOCK(wallet->cs_mapAddressBook)
|
||||
{
|
||||
std::map<std::string, std::string>::iterator mi = wallet->mapAddressBook.find(address.toStdString());
|
||||
if (mi != wallet->mapAddressBook.end())
|
||||
{
|
||||
return QString::fromStdString(mi->second);
|
||||
}
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user