@@ -501,7 +501,7 @@ static UniValue listaddressgroupings(const JSONRPCRequest& request)
501501 {
502502 const auto * address_book_entry = pwallet->FindAddressBookEntry (address);
503503 if (address_book_entry) {
504- addressInfo.push_back (address_book_entry->name );
504+ addressInfo.push_back (address_book_entry->GetLabel () );
505505 }
506506 }
507507 jsonGrouping.push_back (addressInfo);
@@ -1109,7 +1109,7 @@ static UniValue ListReceived(interfaces::Chain::Lock& locked_chain, const CWalle
11091109 {
11101110 if (item_it->second .IsChange ()) continue ;
11111111 const CTxDestination& address = item_it->first ;
1112- const std::string& label = item_it->second .name ;
1112+ const std::string& label = item_it->second .GetLabel () ;
11131113 auto it = mapTally.find (address);
11141114 if (it == mapTally.end () && !fIncludeEmpty )
11151115 continue ;
@@ -1311,7 +1311,7 @@ static void ListTransactions(interfaces::Chain::Lock& locked_chain, const CWalle
13111311 entry.pushKV (" amount" , ValueFromAmount (-s.amount ));
13121312 const auto * address_book_entry = pwallet->FindAddressBookEntry (s.destination );
13131313 if (address_book_entry) {
1314- entry.pushKV (" label" , address_book_entry->name );
1314+ entry.pushKV (" label" , address_book_entry->GetLabel () );
13151315 }
13161316 entry.pushKV (" vout" , s.vout );
13171317 entry.pushKV (" fee" , ValueFromAmount (-nFee));
@@ -1329,7 +1329,7 @@ static void ListTransactions(interfaces::Chain::Lock& locked_chain, const CWalle
13291329 std::string label;
13301330 const auto * address_book_entry = pwallet->FindAddressBookEntry (r.destination );
13311331 if (address_book_entry) {
1332- label = address_book_entry->name ;
1332+ label = address_book_entry->GetLabel () ;
13331333 }
13341334 if (filter_label && label != *filter_label) {
13351335 continue ;
@@ -2963,7 +2963,7 @@ static UniValue listunspent(const JSONRPCRequest& request)
29632963
29642964 const auto * address_book_entry = pwallet->FindAddressBookEntry (address);
29652965 if (address_book_entry) {
2966- entry.pushKV (" label" , address_book_entry->name );
2966+ entry.pushKV (" label" , address_book_entry->GetLabel () );
29672967 }
29682968
29692969 std::unique_ptr<SigningProvider> provider = pwallet->GetSolvingProvider (scriptPubKey);
@@ -3710,7 +3710,7 @@ static UniValue AddressBookDataToJSON(const CAddressBookData& data, const bool v
37103710{
37113711 UniValue ret (UniValue::VOBJ);
37123712 if (verbose) {
3713- ret.pushKV (" name" , data.name );
3713+ ret.pushKV (" name" , data.GetLabel () );
37143714 }
37153715 ret.pushKV (" purpose" , data.purpose );
37163716 return ret;
@@ -3822,7 +3822,7 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
38223822 // value of the name key/value pair in the labels array below.
38233823 const auto * address_book_entry = pwallet->FindAddressBookEntry (dest);
38243824 if (pwallet->chain ().rpcEnableDeprecated (" label" ) && address_book_entry) {
3825- ret.pushKV (" label" , address_book_entry->name );
3825+ ret.pushKV (" label" , address_book_entry->GetLabel () );
38263826 }
38273827
38283828 ret.pushKV (" ischange" , pwallet->IsChange (scriptPubKey));
@@ -3851,7 +3851,7 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
38513851 if (pwallet->chain ().rpcEnableDeprecated (" labelspurpose" )) {
38523852 labels.push_back (AddressBookDataToJSON (*address_book_entry, true ));
38533853 } else {
3854- labels.push_back (address_book_entry->name );
3854+ labels.push_back (address_book_entry->GetLabel () );
38553855 }
38563856 }
38573857 ret.pushKV (" labels" , std::move (labels));
@@ -3897,7 +3897,7 @@ static UniValue getaddressesbylabel(const JSONRPCRequest& request)
38973897 std::set<std::string> addresses;
38983898 for (const std::pair<const CTxDestination, CAddressBookData>& item : pwallet->m_address_book ) {
38993899 if (item.second .IsChange ()) continue ;
3900- if (item.second .name == label) {
3900+ if (item.second .GetLabel () == label) {
39013901 std::string address = EncodeDestination (item.first );
39023902 // CWallet::m_address_book is not expected to contain duplicate
39033903 // address strings, but build a separate set as a precaution just in
@@ -3963,7 +3963,7 @@ static UniValue listlabels(const JSONRPCRequest& request)
39633963 for (const std::pair<const CTxDestination, CAddressBookData>& entry : pwallet->m_address_book ) {
39643964 if (entry.second .IsChange ()) continue ;
39653965 if (purpose.empty () || entry.second .purpose == purpose) {
3966- label_set.insert (entry.second .name );
3966+ label_set.insert (entry.second .GetLabel () );
39673967 }
39683968 }
39693969
0 commit comments