@@ -507,7 +507,7 @@ static UniValue listaddressgroupings(const JSONRPCRequest& request)
507507 {
508508 const auto * address_book_entry = pwallet->FindAddressBookEntry (address);
509509 if (address_book_entry) {
510- addressInfo.push_back (pwallet-> m_address_book . find (address)-> second . name );
510+ addressInfo.push_back (address_book_entry-> name );
511511 }
512512 }
513513 jsonGrouping.push_back (addressInfo);
@@ -1317,7 +1317,7 @@ static void ListTransactions(interfaces::Chain::Lock& locked_chain, const CWalle
13171317 entry.pushKV (" amount" , ValueFromAmount (-s.amount ));
13181318 const auto * address_book_entry = pwallet->FindAddressBookEntry (s.destination );
13191319 if (address_book_entry) {
1320- entry.pushKV (" label" , pwallet-> m_address_book . at (s. destination ). name );
1320+ entry.pushKV (" label" , address_book_entry-> name );
13211321 }
13221322 entry.pushKV (" vout" , s.vout );
13231323 entry.pushKV (" fee" , ValueFromAmount (-nFee));
@@ -1335,7 +1335,7 @@ static void ListTransactions(interfaces::Chain::Lock& locked_chain, const CWalle
13351335 std::string label;
13361336 const auto * address_book_entry = pwallet->FindAddressBookEntry (r.destination );
13371337 if (address_book_entry) {
1338- label = pwallet-> m_address_book . at (r. destination ). name ;
1338+ label = address_book_entry-> name ;
13391339 }
13401340 if (filter_label && label != *filter_label) {
13411341 continue ;
@@ -3820,7 +3820,7 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
38203820 // value of the name key/value pair in the labels array below.
38213821 const auto * address_book_entry = pwallet->FindAddressBookEntry (dest);
38223822 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 );
38243824 }
38253825
38263826 ret.pushKV (" ischange" , pwallet->IsChange (scriptPubKey));
0 commit comments