mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add signed option to to_human output.
This commit is contained in:
@@ -513,6 +513,7 @@ Amount.prototype.to_human = function (opts)
|
|||||||
}
|
}
|
||||||
|
|
||||||
var formatted = '';
|
var formatted = '';
|
||||||
|
if (opts.signed && this._is_negative) formatted += "- ";
|
||||||
formatted += int_part.length ? int_part : '0';
|
formatted += int_part.length ? int_part : '0';
|
||||||
formatted += fraction_part.length ? '.'+fraction_part : '';
|
formatted += fraction_part.length ? '.'+fraction_part : '';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user