diff --git a/src/rpc/handlers/AccountInfo.cpp b/src/rpc/handlers/AccountInfo.cpp index 460f20ab6..b272ec3e6 100644 --- a/src/rpc/handlers/AccountInfo.cpp +++ b/src/rpc/handlers/AccountInfo.cpp @@ -177,7 +177,7 @@ tag_invoke(boost::json::value_from_tag, boost::json::value& jv, AccountInfoHandl auto const pseudoFields = ripple::getPseudoAccountFields(); for (auto const& pseudoField : pseudoFields) { if (output.accountData.isFieldPresent(*pseudoField)) { - std::string name = pseudoField->fieldName; + std::string_view name = pseudoField->fieldName; if (name.ends_with("ID")) { // Remove the ID suffix from the field name. name = name.substr(0, name.size() - 2);