mirror of
https://github.com/XRPLF/clio.git
synced 2026-04-29 15:37:53 +00:00
@@ -57,9 +57,7 @@ NFTInfoHandler::process(NFTInfoHandler::Input input, Context const& ctx) const
|
||||
output.issuer = toBase58(nft::getIssuer(nft.tokenID));
|
||||
output.taxon = nft::toUInt32(nft::getTaxon(nft.tokenID));
|
||||
output.serial = nft::getSerial(nft.tokenID);
|
||||
|
||||
if (not nft.isBurned)
|
||||
output.uri = strHex(nft.uri);
|
||||
output.uri = strHex(nft.uri);
|
||||
|
||||
return output;
|
||||
}
|
||||
@@ -68,7 +66,7 @@ void
|
||||
tag_invoke(boost::json::value_from_tag, boost::json::value& jv, NFTInfoHandler::Output const& output)
|
||||
{
|
||||
// TODO: use JStrings when they become available
|
||||
auto object = boost::json::object{
|
||||
jv = boost::json::object{
|
||||
{JS(nft_id), output.nftID},
|
||||
{JS(ledger_index), output.ledgerIndex},
|
||||
{JS(owner), output.owner},
|
||||
@@ -79,12 +77,8 @@ tag_invoke(boost::json::value_from_tag, boost::json::value& jv, NFTInfoHandler::
|
||||
{"nft_taxon", output.taxon},
|
||||
{JS(nft_serial), output.serial},
|
||||
{JS(validated), output.validated},
|
||||
{JS(uri), output.uri},
|
||||
};
|
||||
|
||||
if (output.uri)
|
||||
object[JS(uri)] = *(output.uri);
|
||||
|
||||
jv = std::move(object);
|
||||
}
|
||||
|
||||
NFTInfoHandler::Input
|
||||
|
||||
@@ -46,10 +46,9 @@ public:
|
||||
uint32_t transferFee;
|
||||
std::string issuer;
|
||||
uint32_t taxon;
|
||||
uint32_t serial; // TODO: documented as 'nft_sequence' atm.
|
||||
// https://github.com/XRPLF/xrpl-dev-portal/issues/1841
|
||||
std::optional<std::string> uri; // TODO: documented can be null vs. empty string
|
||||
// https://github.com/XRPLF/xrpl-dev-portal/issues/1841
|
||||
uint32_t serial; // TODO: documented as 'nft_sequence' atm.
|
||||
// https://github.com/XRPLF/xrpl-dev-portal/issues/1841
|
||||
std::string uri;
|
||||
|
||||
// validated should be sent via framework
|
||||
bool validated = true;
|
||||
|
||||
Reference in New Issue
Block a user