@@ -3753,12 +3753,7 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
37533753 {RPCResult::Type::ARR, " labels" , " Array of labels associated with the address. Currently limited to one label but returned\n "
37543754 " as an array to keep the API stable if multiple labels are enabled in the future." ,
37553755 {
3756- {RPCResult::Type::STR, " label name" , " The label name. Defaults to \"\" ." },
3757- {RPCResult::Type::OBJ, " " , " label data, DEPRECATED, will be removed in 0.21. To re-enable, launch bitcoind with `-deprecatedrpc=labelspurpose`" ,
3758- {
3759- {RPCResult::Type::STR, " name" , " The label name. Defaults to \"\" ." },
3760- {RPCResult::Type::STR, " purpose" , " The purpose of the associated address (send or receive)." },
3761- }},
3756+ {RPCResult::Type::STR, " label name" , " Label name (defaults to \"\" )." },
37623757 }},
37633758 }
37643759 },
@@ -3822,13 +3817,7 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
38223817 UniValue labels (UniValue::VARR);
38233818 const auto * address_book_entry = pwallet->FindAddressBookEntry (dest);
38243819 if (address_book_entry) {
3825- // DEPRECATED: The previous behavior of returning an array containing a
3826- // JSON object of `name` and `purpose` key/value pairs is deprecated.
3827- if (pwallet->chain ().rpcEnableDeprecated (" labelspurpose" )) {
3828- labels.push_back (AddressBookDataToJSON (*address_book_entry, true ));
3829- } else {
3830- labels.push_back (address_book_entry->GetLabel ());
3831- }
3820+ labels.push_back (address_book_entry->GetLabel ());
38323821 }
38333822 ret.pushKV (" labels" , std::move (labels));
38343823
0 commit comments