feat: Propagate underlying MPT flags to vault shares (#7077)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Denis Angell <dangell@transia.co>
Co-authored-by: Fomo <508629+shortthefomo@users.noreply.github.com>
Co-authored-by: Bart <bthomee@users.noreply.github.com>
Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
Vito Tumas
2026-05-20 21:44:09 +02:00
committed by GitHub
parent 93ac1aa7aa
commit 9cb049276d
22 changed files with 1483 additions and 133 deletions

View File

@@ -30,6 +30,7 @@
#include <xrpl/basics/base_uint.h>
#include <xrpl/basics/strHex.h>
#include <xrpl/beast/unit_test/suite.h>
#include <xrpl/json/json_value.h>
#include <xrpl/json/to_string.h>
#include <xrpl/ledger/ApplyView.h>
#include <xrpl/ledger/ApplyViewImpl.h>
@@ -191,6 +192,22 @@ class MPToken_test : public beast::unit_test::Suite
.metadata = "test",
.err = temMALFORMED});
}
// sfReferenceHolding is populated internally only by VaultCreate.
// A user-submitted MPTokenIssuanceCreate carrying the field must be
// rejected at preflight under fixCleanup3_2_0.
if (features[fixCleanup3_2_0])
{
Env env{*this, features};
env.fund(XRP(1'000), alice);
env.close();
json::Value jv;
jv[sfAccount] = alice.human();
jv[sfTransactionType] = jss::MPTokenIssuanceCreate;
jv[sfReferenceHolding] = to_string(uint256{1});
env(jv, Ter(temMALFORMED));
}
}
void
@@ -1777,7 +1794,7 @@ class MPToken_test : public beast::unit_test::Suite
env.close();
// Bob authorize credentials
env(deposit::authCredentials(bob, {{dpIssuer, credType}}));
env(deposit::authCredentials(bob, {{.issuer = dpIssuer, .credType = credType}}));
env.close();
// alice try to send 100 MPT to bob, not authorized