From 5866f0882a7149477fb07455e94a815cac15c17a Mon Sep 17 00:00:00 2001 From: Alexandre Van de Sande Date: Fri, 22 May 2015 12:04:06 -0300 Subject: [PATCH] milli should have two l's --- lib/utils/config.js | 4 ++-- lib/utils/utils.js | 8 ++++---- test/utils.toWei.js | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/utils/config.js b/lib/utils/config.js index fdf4179..d25b5d7 100644 --- a/lib/utils/config.js +++ b/lib/utils/config.js @@ -47,10 +47,10 @@ var ETH_UNITS = [ 'picoether', 'nanoether', 'microether', - 'miliether', + 'milliether', 'nano', 'micro', - 'mili', + 'milli', 'ether', 'grand', 'Mether', diff --git a/lib/utils/utils.js b/lib/utils/utils.js index fccfb90..1860a84 100644 --- a/lib/utils/utils.js +++ b/lib/utils/utils.js @@ -51,8 +51,8 @@ var unitMap = { 'microether': '1000000000000', 'micro': '1000000000000', 'finney': '1000000000000000', - 'miliether': '1000000000000000', - 'mili': '1000000000000000', + 'milliether': '1000000000000000', + 'milli': '1000000000000000', 'ether': '1000000000000000000', 'kether': '1000000000000000000000', 'grand': '1000000000000000000000', @@ -252,7 +252,7 @@ var getValueOfUnit = function (unit) { * - mwei picoether babbage * - gwei nanoether shannon nano * - -- microether szabo micro - * - -- miliether finney mili + * - -- milliether finney milli * - ether -- -- * - kether einstein grand * - mether @@ -279,7 +279,7 @@ var fromWei = function(number, unit) { * - mwei picoether babbage * - gwei nanoether shannon nano * - -- microether szabo micro - * - -- miliether finney mili + * - -- milliether finney milli * - ether -- -- * - kether einstein grand * - mether diff --git a/test/utils.toWei.js b/test/utils.toWei.js index e87315f..55b6c93 100644 --- a/test/utils.toWei.js +++ b/test/utils.toWei.js @@ -23,9 +23,9 @@ describe('lib/utils/utils', function () { assert.equal(utils.toWei(1, 'babbage'), utils.toWei(1, 'picoether')); assert.equal(utils.toWei(1, 'shannon'), utils.toWei(1, 'nanoether')); assert.equal(utils.toWei(1, 'szabo'), utils.toWei(1, 'microether')); - assert.equal(utils.toWei(1, 'finney'), utils.toWei(1, 'miliether')); - assert.equal(utils.toWei(1, 'mili'), utils.toWei(1, 'miliether')); - assert.equal(utils.toWei(1, 'mili'), utils.toWei(1000, 'micro')); + assert.equal(utils.toWei(1, 'finney'), utils.toWei(1, 'milliether')); + assert.equal(utils.toWei(1, 'milli'), utils.toWei(1, 'milliether')); + assert.equal(utils.toWei(1, 'milli'), utils.toWei(1000, 'micro')); assert.throws(function () {utils.toWei(1, 'wei1');}, Error); });