From 0ebdac4f91d79603edc1dbc9a05f12a3512647d4 Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Mon, 10 Dec 2012 23:47:14 -0800 Subject: [PATCH] JS: Fix non-XRP add and canonicalize. --- src/js/amount.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/amount.js b/src/js/amount.js index 5092b29663..0a324ac882 100644 --- a/src/js/amount.js +++ b/src/js/amount.js @@ -516,6 +516,7 @@ Amount.prototype.add = function (v) { } result = new Amount(); + result._is_native = false; result._offset = o1; result._value = v1.add(v2); result._is_negative = result._value.compareTo(BigInteger.ZERO) < 0; @@ -713,7 +714,7 @@ Amount.prototype.divide = function (d) { Amount.prototype.is_comparable = function (v) { return this._value instanceof BigInteger && v._value instanceof BigInteger - && this._is_native === v.is_native; + && this._is_native === v._is_native; }; Amount.prototype.is_native = function () {