@@ -501,7 +501,7 @@ static UniValue listaddressgroupings(const JSONRPCRequest& request)
501
501
{
502
502
const auto * address_book_entry = pwallet->FindAddressBookEntry (address);
503
503
if (address_book_entry) {
504
- addressInfo.push_back (address_book_entry->name );
504
+ addressInfo.push_back (address_book_entry->GetLabel () );
505
505
}
506
506
}
507
507
jsonGrouping.push_back (addressInfo);
@@ -1109,7 +1109,7 @@ static UniValue ListReceived(interfaces::Chain::Lock& locked_chain, const CWalle
1109
1109
{
1110
1110
if (item_it->second .IsChange ()) continue ;
1111
1111
const CTxDestination& address = item_it->first ;
1112
- const std::string& label = item_it->second .name ;
1112
+ const std::string& label = item_it->second .GetLabel () ;
1113
1113
auto it = mapTally.find (address);
1114
1114
if (it == mapTally.end () && !fIncludeEmpty )
1115
1115
continue ;
@@ -1311,7 +1311,7 @@ static void ListTransactions(interfaces::Chain::Lock& locked_chain, const CWalle
1311
1311
entry.pushKV (" amount" , ValueFromAmount (-s.amount ));
1312
1312
const auto * address_book_entry = pwallet->FindAddressBookEntry (s.destination );
1313
1313
if (address_book_entry) {
1314
- entry.pushKV (" label" , address_book_entry->name );
1314
+ entry.pushKV (" label" , address_book_entry->GetLabel () );
1315
1315
}
1316
1316
entry.pushKV (" vout" , s.vout );
1317
1317
entry.pushKV (" fee" , ValueFromAmount (-nFee));
@@ -1329,7 +1329,7 @@ static void ListTransactions(interfaces::Chain::Lock& locked_chain, const CWalle
1329
1329
std::string label;
1330
1330
const auto * address_book_entry = pwallet->FindAddressBookEntry (r.destination );
1331
1331
if (address_book_entry) {
1332
- label = address_book_entry->name ;
1332
+ label = address_book_entry->GetLabel () ;
1333
1333
}
1334
1334
if (filter_label && label != *filter_label) {
1335
1335
continue ;
@@ -2963,7 +2963,7 @@ static UniValue listunspent(const JSONRPCRequest& request)
2963
2963
2964
2964
const auto * address_book_entry = pwallet->FindAddressBookEntry (address);
2965
2965
if (address_book_entry) {
2966
- entry.pushKV (" label" , address_book_entry->name );
2966
+ entry.pushKV (" label" , address_book_entry->GetLabel () );
2967
2967
}
2968
2968
2969
2969
std::unique_ptr<SigningProvider> provider = pwallet->GetSolvingProvider (scriptPubKey);
@@ -3710,7 +3710,7 @@ static UniValue AddressBookDataToJSON(const CAddressBookData& data, const bool v
3710
3710
{
3711
3711
UniValue ret (UniValue::VOBJ);
3712
3712
if (verbose) {
3713
- ret.pushKV (" name" , data.name );
3713
+ ret.pushKV (" name" , data.GetLabel () );
3714
3714
}
3715
3715
ret.pushKV (" purpose" , data.purpose );
3716
3716
return ret;
@@ -3822,7 +3822,7 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
3822
3822
// value of the name key/value pair in the labels array below.
3823
3823
const auto * address_book_entry = pwallet->FindAddressBookEntry (dest);
3824
3824
if (pwallet->chain ().rpcEnableDeprecated (" label" ) && address_book_entry) {
3825
- ret.pushKV (" label" , address_book_entry->name );
3825
+ ret.pushKV (" label" , address_book_entry->GetLabel () );
3826
3826
}
3827
3827
3828
3828
ret.pushKV (" ischange" , pwallet->IsChange (scriptPubKey));
@@ -3851,7 +3851,7 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
3851
3851
if (pwallet->chain ().rpcEnableDeprecated (" labelspurpose" )) {
3852
3852
labels.push_back (AddressBookDataToJSON (*address_book_entry, true ));
3853
3853
} else {
3854
- labels.push_back (address_book_entry->name );
3854
+ labels.push_back (address_book_entry->GetLabel () );
3855
3855
}
3856
3856
}
3857
3857
ret.pushKV (" labels" , std::move (labels));
@@ -3897,7 +3897,7 @@ static UniValue getaddressesbylabel(const JSONRPCRequest& request)
3897
3897
std::set<std::string> addresses;
3898
3898
for (const std::pair<const CTxDestination, CAddressBookData>& item : pwallet->m_address_book ) {
3899
3899
if (item.second .IsChange ()) continue ;
3900
- if (item.second .name == label) {
3900
+ if (item.second .GetLabel () == label) {
3901
3901
std::string address = EncodeDestination (item.first );
3902
3902
// CWallet::m_address_book is not expected to contain duplicate
3903
3903
// address strings, but build a separate set as a precaution just in
@@ -3963,7 +3963,7 @@ static UniValue listlabels(const JSONRPCRequest& request)
3963
3963
for (const std::pair<const CTxDestination, CAddressBookData>& entry : pwallet->m_address_book ) {
3964
3964
if (entry.second .IsChange ()) continue ;
3965
3965
if (purpose.empty () || entry.second .purpose == purpose) {
3966
- label_set.insert (entry.second .name );
3966
+ label_set.insert (entry.second .GetLabel () );
3967
3967
}
3968
3968
}
3969
3969
0 commit comments