Skip to content

Commit

Permalink
version 0.1.7 -- fix hex
Browse files Browse the repository at this point in the history
  • Loading branch information
SilentCicero committed Dec 20, 2016
1 parent 4099501 commit 413fdec
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 0.1.6 -- hex prefix
# 0.1.7 -- hex prefix

1. Updates number-to-bn

Expand Down
19 changes: 12 additions & 7 deletions dist/ethjs-format.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/ethjs-format.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/ethjs-format.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ethjs-format",
"version": "0.1.6",
"version": "0.1.7",
"description": "A payload formatter for the Ethereum RPC layer.",
"main": "lib/index.js",
"files": [
Expand Down Expand Up @@ -121,10 +121,10 @@
"dependencies": {
"bn.js": "4.11.6",
"ethjs-schema": "0.1.4",
"strip-hex-prefix": "1.0.0",
"ethjs-util": "0.1.3",
"is-hex-prefixed": "1.0.0",
"number-to-bn": "1.5.0",
"ethjs-util": "0.1.3"
"number-to-bn": "1.6.0",
"strip-hex-prefix": "1.0.0"
},
"devDependencies": {
"babel-cli": "6.18.0",
Expand Down
5 changes: 3 additions & 2 deletions src/tests/test.index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('test ethjs-format object', () => {
const undefinedNumber = undefined;
const emptyString = '';
const zeroNumber = 0;
const justPrefix = '0x';
const justPrefix = '0';
const floatNumber = '238428.237842';

assert.equal(format.formatQuantity(emptyString, true), '0x00');
Expand All @@ -30,6 +30,7 @@ describe('test ethjs-format object', () => {
assert.equal(format.formatQuantity(noPrefixHexNumber, true), '0x021d21a2'.toLowerCase());
assert.equal(format.formatQuantity(prefixHexNumber, true), '0x021d21a2'.toLowerCase());
assert.equal(format.formatQuantity(justPrefix, true), '0x00');
assert.equal(format.formatQuantity('0x10', true), '0x10');

try {
format.formatQuantity(floatNumber, true);
Expand Down Expand Up @@ -82,7 +83,7 @@ describe('test ethjs-format object', () => {
const undefinedNumber = undefined;
const emptyString = '';
const zeroNumber = 0;
const justPrefix = '0x';
const justPrefix = '0';
const floatNumber = '238428.237842';

const r1 = format.formatQuantity(prefixHexNumber, false).toString(10);
Expand Down

0 comments on commit 413fdec

Please sign in to comment.