mirror of
https://github.com/XRPLF/clio.git
synced 2026-08-23 13:40:52 +00:00
feat: Support filtering txns by mpt_issuance_id (#3153)
Adds an optional `mpt_issuance_id ` field to Account_tx so that users can filter Account transactions if the transaction is involved in a specific `mpt_issuance_id `
This commit is contained in:
@@ -155,6 +155,25 @@ getMPTokenIssuanceTxsFromTx(xrpl::TxMeta const& txMeta, xrpl::STTx const& sttx)
|
||||
return result;
|
||||
}
|
||||
|
||||
bool
|
||||
referencesMptIssuance(
|
||||
xrpl::TxMeta const& txMeta,
|
||||
xrpl::STTx const& sttx,
|
||||
xrpl::uint192 const& mptIssuanceID
|
||||
)
|
||||
{
|
||||
if (txMeta.getResultTER() == xrpl::tesSUCCESS) {
|
||||
for (auto const& node : txMeta.getNodes()) {
|
||||
if (getMPTokenIssuanceIDFromNode(node) == mptIssuanceID)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
MPTokenIssuanceIDs issuanceIDs;
|
||||
addMPTokenIssuanceIDsFromTx(issuanceIDs, sttx);
|
||||
return issuanceIDs.contains(mptIssuanceID);
|
||||
}
|
||||
|
||||
std::optional<MPTHolderData>
|
||||
getMPTHolderFromObj(std::string const& key, std::string const& blob)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user