diff --git a/src/test/jtx/amount.h b/src/test/jtx/amount.h index 11b366b3a68..0b408f80164 100644 --- a/src/test/jtx/amount.h +++ b/src/test/jtx/amount.h @@ -446,7 +446,7 @@ class MPT return mptID; } - /** Implicit conversion to Issue. + /** Implicit conversion to MPTIssue. This allows passing an MPT value where an Issue is expected. @@ -457,23 +457,10 @@ class MPT } template - requires(sizeof(T) >= sizeof(int) && std::is_arithmetic_v) PrettyAmount + requires(sizeof(T) >= sizeof(int) && std::is_arithmetic_v) STMPTAmount operator()(T v) const { - // VFALCO NOTE Should throw if the - // representation of v is not exact. - return {amountFromString(mptID, std::to_string(v)), name}; - } - - PrettyAmount operator()(epsilon_t) const; - PrettyAmount operator()(detail::epsilon_multiple) const; - - friend BookSpec - operator~(MPT const& mpt) - { - assert(false); - Throw("MPT is not supported"); - return BookSpec{beast::zero, noCurrency()}; + return amountFromString(mptID, std::to_string(v)); } }; diff --git a/src/test/jtx/impl/mpt.cpp b/src/test/jtx/impl/mpt.cpp index 416ce900618..9279ea68c48 100644 --- a/src/test/jtx/impl/mpt.cpp +++ b/src/test/jtx/impl/mpt.cpp @@ -365,7 +365,7 @@ MPTTester::claw( mptpay(*this, holder, holderAmt - std::min(holderAmt, amount))); } -PrettyAmount +STMPTAmount MPTTester::mpt(std::int64_t amount) const { assert(mpt_); diff --git a/src/test/jtx/mpt.h b/src/test/jtx/mpt.h index f166c754cfd..e3ebb69d658 100644 --- a/src/test/jtx/mpt.h +++ b/src/test/jtx/mpt.h @@ -196,7 +196,7 @@ class MPTTester std::int64_t amount, std::optional err = std::nullopt); - PrettyAmount + STMPTAmount mpt(std::int64_t amount) const; uint256 const&