@@ -507,7 +507,7 @@ static UniValue listaddressgroupings(const JSONRPCRequest& request)
507
507
{
508
508
const auto * address_book_entry = pwallet->FindAddressBookEntry (address);
509
509
if (address_book_entry) {
510
- addressInfo.push_back (pwallet-> m_address_book . find (address)-> second . name );
510
+ addressInfo.push_back (address_book_entry-> name );
511
511
}
512
512
}
513
513
jsonGrouping.push_back (addressInfo);
@@ -1317,7 +1317,7 @@ static void ListTransactions(interfaces::Chain::Lock& locked_chain, const CWalle
1317
1317
entry.pushKV (" amount" , ValueFromAmount (-s.amount ));
1318
1318
const auto * address_book_entry = pwallet->FindAddressBookEntry (s.destination );
1319
1319
if (address_book_entry) {
1320
- entry.pushKV (" label" , pwallet-> m_address_book . at (s. destination ). name );
1320
+ entry.pushKV (" label" , address_book_entry-> name );
1321
1321
}
1322
1322
entry.pushKV (" vout" , s.vout );
1323
1323
entry.pushKV (" fee" , ValueFromAmount (-nFee));
@@ -1335,7 +1335,7 @@ static void ListTransactions(interfaces::Chain::Lock& locked_chain, const CWalle
1335
1335
std::string label;
1336
1336
const auto * address_book_entry = pwallet->FindAddressBookEntry (r.destination );
1337
1337
if (address_book_entry) {
1338
- label = pwallet-> m_address_book . at (r. destination ). name ;
1338
+ label = address_book_entry-> name ;
1339
1339
}
1340
1340
if (filter_label && label != *filter_label) {
1341
1341
continue ;
@@ -3820,7 +3820,7 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
3820
3820
// value of the name key/value pair in the labels array below.
3821
3821
const auto * address_book_entry = pwallet->FindAddressBookEntry (dest);
3822
3822
if (pwallet->chain ().rpcEnableDeprecated (" label" ) && address_book_entry) {
3823
- ret.pushKV (" label" , pwallet-> m_address_book . at (dest). name );
3823
+ ret.pushKV (" label" , address_book_entry-> name );
3824
3824
}
3825
3825
3826
3826
ret.pushKV (" ischange" , pwallet->IsChange (scriptPubKey));
0 commit comments