milli should have two l's
This commit is contained in:
parent
bacb03cc5d
commit
5866f0882a
|
@ -47,10 +47,10 @@ var ETH_UNITS = [
|
||||||
'picoether',
|
'picoether',
|
||||||
'nanoether',
|
'nanoether',
|
||||||
'microether',
|
'microether',
|
||||||
'miliether',
|
'milliether',
|
||||||
'nano',
|
'nano',
|
||||||
'micro',
|
'micro',
|
||||||
'mili',
|
'milli',
|
||||||
'ether',
|
'ether',
|
||||||
'grand',
|
'grand',
|
||||||
'Mether',
|
'Mether',
|
||||||
|
|
|
@ -51,8 +51,8 @@ var unitMap = {
|
||||||
'microether': '1000000000000',
|
'microether': '1000000000000',
|
||||||
'micro': '1000000000000',
|
'micro': '1000000000000',
|
||||||
'finney': '1000000000000000',
|
'finney': '1000000000000000',
|
||||||
'miliether': '1000000000000000',
|
'milliether': '1000000000000000',
|
||||||
'mili': '1000000000000000',
|
'milli': '1000000000000000',
|
||||||
'ether': '1000000000000000000',
|
'ether': '1000000000000000000',
|
||||||
'kether': '1000000000000000000000',
|
'kether': '1000000000000000000000',
|
||||||
'grand': '1000000000000000000000',
|
'grand': '1000000000000000000000',
|
||||||
|
@ -252,7 +252,7 @@ var getValueOfUnit = function (unit) {
|
||||||
* - mwei picoether babbage
|
* - mwei picoether babbage
|
||||||
* - gwei nanoether shannon nano
|
* - gwei nanoether shannon nano
|
||||||
* - -- microether szabo micro
|
* - -- microether szabo micro
|
||||||
* - -- miliether finney mili
|
* - -- milliether finney milli
|
||||||
* - ether -- --
|
* - ether -- --
|
||||||
* - kether einstein grand
|
* - kether einstein grand
|
||||||
* - mether
|
* - mether
|
||||||
|
@ -279,7 +279,7 @@ var fromWei = function(number, unit) {
|
||||||
* - mwei picoether babbage
|
* - mwei picoether babbage
|
||||||
* - gwei nanoether shannon nano
|
* - gwei nanoether shannon nano
|
||||||
* - -- microether szabo micro
|
* - -- microether szabo micro
|
||||||
* - -- miliether finney mili
|
* - -- milliether finney milli
|
||||||
* - ether -- --
|
* - ether -- --
|
||||||
* - kether einstein grand
|
* - kether einstein grand
|
||||||
* - mether
|
* - mether
|
||||||
|
|
|
@ -23,9 +23,9 @@ describe('lib/utils/utils', function () {
|
||||||
assert.equal(utils.toWei(1, 'babbage'), utils.toWei(1, 'picoether'));
|
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, 'shannon'), utils.toWei(1, 'nanoether'));
|
||||||
assert.equal(utils.toWei(1, 'szabo'), utils.toWei(1, 'microether'));
|
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, 'finney'), utils.toWei(1, 'milliether'));
|
||||||
assert.equal(utils.toWei(1, 'mili'), utils.toWei(1, 'miliether'));
|
assert.equal(utils.toWei(1, 'milli'), utils.toWei(1, 'milliether'));
|
||||||
assert.equal(utils.toWei(1, 'mili'), utils.toWei(1000, 'micro'));
|
assert.equal(utils.toWei(1, 'milli'), utils.toWei(1000, 'micro'));
|
||||||
|
|
||||||
assert.throws(function () {utils.toWei(1, 'wei1');}, Error);
|
assert.throws(function () {utils.toWei(1, 'wei1');}, Error);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue