diff --git a/src/libxrpl/protocol/TER.cpp b/src/libxrpl/protocol/TER.cpp index cd0dac413e7..d9af31d2852 100644 --- a/src/libxrpl/protocol/TER.cpp +++ b/src/libxrpl/protocol/TER.cpp @@ -201,6 +201,7 @@ transResults() MAKE_ERROR(temINVALID_COUNT, "Malformed: Count field outside valid range."), MAKE_ERROR(temSEQ_AND_TICKET, "Transaction contains a TicketSequence and a non-zero Sequence."), MAKE_ERROR(temBAD_NFTOKEN_TRANSFER_FEE, "Malformed: The NFToken transfer fee must be between 1 and 5000, inclusive."), + MAKE_ERROR(temBAD_MPTOKEN_TRANSFER_FEE, "Malformed: The MPToken transfer fee must be between 1 and 5000, inclusive."), MAKE_ERROR(temXCHAIN_EQUAL_DOOR_ACCOUNTS, "Malformed: Bridge must have unique door accounts."), MAKE_ERROR(temXCHAIN_BAD_PROOF, "Malformed: Bad cross-chain claim proof."), MAKE_ERROR(temXCHAIN_BRIDGE_BAD_ISSUES, "Malformed: Bad bridge issues."), diff --git a/src/test/app/MPToken_test.cpp b/src/test/app/MPToken_test.cpp index 3bda0a3911a..6e6ccebb1c9 100644 --- a/src/test/app/MPToken_test.cpp +++ b/src/test/app/MPToken_test.cpp @@ -58,7 +58,7 @@ class MPToken_test : public beast::unit_test::suite .metadata = "test", .err = temMALFORMED}); - // tries to set a txfee while not enabling transfer + // tries to set a txfee greater than max mptAlice.create( {.maxAmt = 100, .assetScale = 0, @@ -67,6 +67,14 @@ class MPToken_test : public beast::unit_test::suite .flags = tfMPTCanTransfer, .err = temBAD_MPTOKEN_TRANSFER_FEE}); + // tries to set a txfee while not enabling transfer + mptAlice.create( + {.maxAmt = 100, + .assetScale = 0, + .transferFee = maxTransferFee, + .metadata = "test", + .err = temMALFORMED}); + // empty metadata returns error mptAlice.create( {.maxAmt = 100,