Show Share.mpt_issuance_id rather than MPTokenIssuanceID

This commit is contained in:
Bronek Kozicki
2025-03-20 18:26:05 +00:00
parent 4c7119b92f
commit 3d2102106c
2 changed files with 8 additions and 0 deletions

View File

@@ -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.

View File

@@ -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;
}