mirror of
https://github.com/XRPLF/clio.git
synced 2026-08-19 03:30:53 +00:00
fix: Make Loan and LoanBroker filterable in account_objects/ledger_data (#3124)
This commit is contained in:
@@ -143,6 +143,13 @@ class LedgerTypes {
|
||||
xrpl::ltCREDENTIAL
|
||||
),
|
||||
LedgerTypeAttribute::accountOwnedLedgerType(JS(Vault), JS(vault), xrpl::ltVAULT),
|
||||
// loan broker is a pseudo-account object, like AMM and Vault
|
||||
LedgerTypeAttribute::accountOwnedLedgerType(
|
||||
JS(LoanBroker),
|
||||
JS(loan_broker),
|
||||
xrpl::ltLOAN_BROKER
|
||||
),
|
||||
LedgerTypeAttribute::deletionBlockerLedgerType(JS(Loan), JS(loan), xrpl::ltLOAN),
|
||||
LedgerTypeAttribute::chainLedgerType(JS(NegativeUNL), JS(nunl), xrpl::ltNEGATIVE_UNL),
|
||||
LedgerTypeAttribute::deletionBlockerLedgerType(
|
||||
JS(MPTokenIssuance),
|
||||
|
||||
@@ -41,6 +41,8 @@ TEST(LedgerUtilsTests, LedgerObjectTypeList)
|
||||
JS(oracle),
|
||||
JS(credential),
|
||||
JS(vault),
|
||||
JS(loan_broker),
|
||||
JS(loan),
|
||||
JS(nunl),
|
||||
JS(delegate)
|
||||
};
|
||||
@@ -81,7 +83,8 @@ TEST(LedgerUtilsTests, DeletionBlockerTypes)
|
||||
xrpl::ltBRIDGE,
|
||||
xrpl::ltMPTOKEN_ISSUANCE,
|
||||
xrpl::ltMPTOKEN,
|
||||
xrpl::ltPERMISSIONED_DOMAIN
|
||||
xrpl::ltPERMISSIONED_DOMAIN,
|
||||
xrpl::ltLOAN
|
||||
};
|
||||
|
||||
static_assert(std::size(kDeletionBlockers) == kTestedTypes.size());
|
||||
@@ -137,6 +140,8 @@ static LedgerEntryTypeParam const kAccountOwnedTestCases[] = {
|
||||
{.input = "mptoken", .expected = xrpl::ltMPTOKEN},
|
||||
{.input = "permissioned_domain", .expected = xrpl::ltPERMISSIONED_DOMAIN},
|
||||
{.input = "vault", .expected = xrpl::ltVAULT},
|
||||
{.input = "loan_broker", .expected = xrpl::ltLOAN_BROKER},
|
||||
{.input = "loan", .expected = xrpl::ltLOAN},
|
||||
{.input = "delegate", .expected = xrpl::ltDELEGATE},
|
||||
|
||||
// Using canonical name with exact match
|
||||
@@ -163,6 +168,8 @@ static LedgerEntryTypeParam const kAccountOwnedTestCases[] = {
|
||||
{.input = "MPToken", .expected = xrpl::ltMPTOKEN},
|
||||
{.input = "PermissionedDomain", .expected = xrpl::ltPERMISSIONED_DOMAIN},
|
||||
{.input = "Vault", .expected = xrpl::ltVAULT},
|
||||
{.input = "LoanBroker", .expected = xrpl::ltLOAN_BROKER},
|
||||
{.input = "Loan", .expected = xrpl::ltLOAN},
|
||||
{.input = "Delegate", .expected = xrpl::ltDELEGATE}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user