ripple-binary-codec
Advanced tools
Comparing version 0.1.13 to 0.1.14
@@ -35,3 +35,3 @@ 'use strict';var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {return typeof obj;} : function (obj) {return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;};function _toConsumableArray(arr) {if (Array.isArray(arr)) {for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {arr2[i] = arr[i];}return arr2;} else {return Array.from(arr);}}var _ = require('lodash'); | ||
MAX_IOU_PRECISION + ' significant digits. They are serialized as\na canonicalised mantissa and exponent. \n\nThe valid range for a mantissa is between ' + | ||
MAX_IOU_PRECISION + ' significant digits. They are serialized as\na canonicalised mantissa and exponent.\n\nThe valid range for a mantissa is between ' + | ||
@@ -76,8 +76,10 @@ | ||
var Amount = makeClass({ | ||
Amount: function Amount(value, currency, issuer) { | ||
Amount: function Amount(value, currency, issuer) {var validate = arguments.length <= 3 || arguments[3] === undefined ? true : arguments[3]; | ||
this.value = value || new Decimal('0'); | ||
this.currency = currency || Currency.XRP; | ||
this.issuer = issuer || null; | ||
this.assertValueIsValid();}, | ||
if (validate) { | ||
this.assertValueIsValid();}}, | ||
mixins: SerializedType, | ||
@@ -113,3 +115,3 @@ statics: { | ||
times('1e' + exponent); | ||
return new this(value, currency, issuer);} | ||
return new this(value, currency, issuer, false);} | ||
@@ -120,3 +122,3 @@ | ||
var xrpValue = drops.dividedBy(DROPS_PER_XRP); | ||
return new this(xrpValue, Currency.XRP);} }, | ||
return new this(xrpValue, Currency.XRP, null, false);} }, | ||
@@ -123,0 +125,0 @@ |
{ | ||
"name": "ripple-binary-codec", | ||
"version": "0.1.13", | ||
"version": "0.1.14", | ||
"description": "ripple binary codec", | ||
@@ -5,0 +5,0 @@ "files": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
899739
12831