mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
JS: Fix amount parsing to accept negative exponents.
This commit is contained in:
@@ -1025,7 +1025,7 @@ Amount.prototype.parse_value = function (j) {
|
||||
else if ('string' === typeof j) {
|
||||
var i = j.match(/^(-?)(\d+)$/);
|
||||
var d = !i && j.match(/^(-?)(\d+)\.(\d*)$/);
|
||||
var e = !e && j.match(/^(-?)(\d+)e(\d+)$/);
|
||||
var e = !e && j.match(/^(-?)(\d+)e(-?\d+)$/);
|
||||
|
||||
if (e) {
|
||||
// e notation
|
||||
|
||||
Reference in New Issue
Block a user