-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chang UINT64 amounts to base 10 display #35
Chang UINT64 amounts to base 10 display #35
Conversation
return str; | ||
}; | ||
|
||
if (auto const& fName = getFName(); fName == sfMaximumAmount || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't feel right having ST* types having knowledge of specific fields. Is it the only way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
STUInt16 has something similar, so i think this is fine
Json::Value STUInt16::getJson(JsonOptions) const
{
if (getFName() == sfLedgerEntryType)
{
auto item = LedgerFormats::getInstance().findByType(
safe_cast<LedgerEntryType>(value_));
if (item != nullptr)
return item->getName();
}
@@ -398,8 +398,16 @@ parseLeaf( | |||
|
|||
std::uint64_t val; | |||
|
|||
bool const useBase10 = field == sfMaximumAmount || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same - generic type has knowledge of specific fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
@@ -97,7 +97,7 @@ struct MPTConstr | |||
|
|||
struct MPTCreate | |||
{ | |||
std::optional<std::int64_t> maxAmt = std::nullopt; | |||
std::optional<std::string> maxAmt = std::nullopt; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to change the type? Can just change when the value is formatted to the field.
High Level Overview of Change
Context of Change
Type of Change
.gitignore
, formatting, dropping support for older tooling)API Impact
libxrpl
change (any change that may affectlibxrpl
or dependents oflibxrpl
)