From 3d2102106c99647c130d2863f4e38d961f18a777 Mon Sep 17 00:00:00 2001 From: Bronek Kozicki Date: Thu, 20 Mar 2025 18:26:05 +0000 Subject: [PATCH] Show Share.mpt_issuance_id rather than MPTokenIssuanceID --- include/xrpl/protocol/jss.h | 1 + src/libxrpl/protocol/STLedgerEntry.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/include/xrpl/protocol/jss.h b/include/xrpl/protocol/jss.h index 85c7b95387..d297334a0a 100644 --- a/include/xrpl/protocol/jss.h +++ b/include/xrpl/protocol/jss.h @@ -89,6 +89,7 @@ JSS(SettleDelay); // in: TransactionSign JSS(SendMax); // in: TransactionSign JSS(Sequence); // in/out: TransactionSign; field. JSS(SetFlag); // field. +JSS(Share); // out: Vault JSS(Signer); // field. JSS(Signers); // field. JSS(SigningPubKey); // field. diff --git a/src/libxrpl/protocol/STLedgerEntry.cpp b/src/libxrpl/protocol/STLedgerEntry.cpp index ae80abb69f..f9cdcd5ee2 100644 --- a/src/libxrpl/protocol/STLedgerEntry.cpp +++ b/src/libxrpl/protocol/STLedgerEntry.cpp @@ -141,6 +141,13 @@ STLedgerEntry::getJson(JsonOptions options) const if (getType() == ltMPTOKEN_ISSUANCE) ret[jss::mpt_issuance_id] = to_string( makeMptID(getFieldU32(sfSequence), getAccountID(sfIssuer))); + else if (getType() == ltVAULT) + { + // Replace "MPTokenIssuanceID" with functionally equivalent "Share" + const char* const fieldMptIssue = sfMPTokenIssuanceID.fieldName.c_str(); + ret.removeMember(fieldMptIssue); + ret[jss::Share] = to_json(MPTIssue(getFieldH192(sfMPTokenIssuanceID))); + } return ret; }