ripple-binary-codec
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -96,3 +96,3 @@ "use strict"; | ||
} | ||
else if (code.toString('hex') === '000000') { | ||
else if (/^0*$/.test(_this.bytes.toString('hex'))) { | ||
_this._iso = 'XRP'; | ||
@@ -99,0 +99,0 @@ } |
{ | ||
"name": "ripple-binary-codec", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "XRP Ledger binary codec", | ||
@@ -20,3 +20,3 @@ "files": [ | ||
"decimal.js": "^10.2.0", | ||
"ripple-address-codec": "^4.2.1" | ||
"ripple-address-codec": "^4.2.2" | ||
}, | ||
@@ -46,3 +46,3 @@ "scripts": { | ||
}, | ||
"gitHead": "7c6230b18ec2ed031c7e379ffb94e34b940b6542" | ||
"gitHead": "78d9b117941cd9ce06d6f1291eb24e882482ceab" | ||
} |
@@ -72,2 +72,3 @@ const { coreTypes } = require('../dist/types') | ||
}) | ||
test('can be constructed from a Buffer', function () { | ||
@@ -81,2 +82,8 @@ const xrp = new Currency(Buffer.alloc(20)) | ||
}) | ||
test('Can handle other non-standard currency codes', () => { | ||
const currency = '0000000000414C6F676F30330000000000000000' | ||
expect(Currency.from(currency).toJSON()).toBe(currency) | ||
}) | ||
test('throws on invalid reprs', function () { | ||
@@ -83,0 +90,0 @@ expect(() => Currency.from(Buffer.alloc(19))).toThrow() |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1101404
16785
Updatedripple-address-codec@^4.2.2