mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-03 08:46:46 +00:00
fixing bad merge issue
Signed-off-by: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com>
This commit is contained in:
@@ -839,17 +839,22 @@ STAmount::canonicalize()
|
||||
|
||||
Number const num(mIsNegative, mValue, mOffset, Number::unchecked{});
|
||||
auto set = [&](auto const& val) {
|
||||
mIsNegative = val.value() < 0;
|
||||
mValue = mIsNegative ? -val.value() : val.value();
|
||||
auto const value = val.value();
|
||||
mIsNegative = value < 0;
|
||||
mValue = mIsNegative ? -value : value;
|
||||
};
|
||||
if (native())
|
||||
{
|
||||
set(XRPAmount{num});
|
||||
}
|
||||
else
|
||||
else if (mAsset.holds<MPTIssue>())
|
||||
{
|
||||
set(MPTAmount{num});
|
||||
}
|
||||
else
|
||||
{
|
||||
Throw<std::runtime_error>("Unknown integral asset type");
|
||||
}
|
||||
mOffset = 0;
|
||||
|
||||
if (native() && mValue > cMaxNativeN)
|
||||
|
||||
Reference in New Issue
Block a user