diff --git a/src/util/LedgerUtils.hpp b/src/util/LedgerUtils.hpp index 037116d7a..22b5d4ab2 100644 --- a/src/util/LedgerUtils.hpp +++ b/src/util/LedgerUtils.hpp @@ -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), diff --git a/tests/unit/util/LedgerUtilsTests.cpp b/tests/unit/util/LedgerUtilsTests.cpp index b8ed6d7c1..7e6938890 100644 --- a/tests/unit/util/LedgerUtilsTests.cpp +++ b/tests/unit/util/LedgerUtilsTests.cpp @@ -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} };