mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
Merge 13a28b18fe into b2b9b3b567
This commit is contained in:
commit
51052c52f5
2 changed files with 114 additions and 82 deletions
File diff suppressed because one or more lines are too long
|
|
@ -768,11 +768,18 @@ var BigNumber = require('bignumber.js');
|
||||||
|
|
||||||
var ETH_UNITS = [
|
var ETH_UNITS = [
|
||||||
'wei',
|
'wei',
|
||||||
'Kwei',
|
'kwei',
|
||||||
'Mwei',
|
'Mwei',
|
||||||
'Gwei',
|
'Gwei',
|
||||||
'szabo',
|
'szabo',
|
||||||
'finney',
|
'finney',
|
||||||
|
'femtoether',
|
||||||
|
'picoether',
|
||||||
|
'nanoether',
|
||||||
|
'microether',
|
||||||
|
'miliether',
|
||||||
|
'micro',
|
||||||
|
'mili',
|
||||||
'ether',
|
'ether',
|
||||||
'grand',
|
'grand',
|
||||||
'Mether',
|
'Mether',
|
||||||
|
|
@ -873,12 +880,19 @@ var unitMap = {
|
||||||
'wei': '1',
|
'wei': '1',
|
||||||
'kwei': '1000',
|
'kwei': '1000',
|
||||||
'ada': '1000',
|
'ada': '1000',
|
||||||
|
'femtoether': '1000',
|
||||||
'mwei': '1000000',
|
'mwei': '1000000',
|
||||||
'babbage': '1000000',
|
'babbage': '1000000',
|
||||||
|
'picoether': '1000000',
|
||||||
'gwei': '1000000000',
|
'gwei': '1000000000',
|
||||||
'shannon': '1000000000',
|
'shannon': '1000000000',
|
||||||
|
'nanoether': '1000000000',
|
||||||
'szabo': '1000000000000',
|
'szabo': '1000000000000',
|
||||||
|
'microether': '1000000000000',
|
||||||
|
'micro': '1000000000000',
|
||||||
'finney': '1000000000000000',
|
'finney': '1000000000000000',
|
||||||
|
'miliether': '1000000000000000',
|
||||||
|
'mili': '1000000000000000',
|
||||||
'ether': '1000000000000000000',
|
'ether': '1000000000000000000',
|
||||||
'kether': '1000000000000000000000',
|
'kether': '1000000000000000000000',
|
||||||
'grand': '1000000000000000000000',
|
'grand': '1000000000000000000000',
|
||||||
|
|
@ -1073,13 +1087,14 @@ var getValueOfUnit = function (unit) {
|
||||||
* Takes a number of wei and converts it to any other ether unit.
|
* Takes a number of wei and converts it to any other ether unit.
|
||||||
*
|
*
|
||||||
* Possible units are:
|
* Possible units are:
|
||||||
* - kwei/ada
|
* SI Short SI Full Effigy Other
|
||||||
* - mwei/babbage
|
* - kwei femtoether ada
|
||||||
* - gwei/shannon
|
* - mwei picoether babbage
|
||||||
* - szabo
|
* - gwei nanoether shannon
|
||||||
* - finney
|
* - -- microether szabo micro
|
||||||
* - ether
|
* - -- miliether finney mili
|
||||||
* - kether/grand/einstein
|
* - ether -- --
|
||||||
|
* - kether einstein grand
|
||||||
* - mether
|
* - mether
|
||||||
* - gether
|
* - gether
|
||||||
* - tether
|
* - tether
|
||||||
|
|
@ -1099,13 +1114,14 @@ var fromWei = function(number, unit) {
|
||||||
* Takes a number of a unit and converts it to wei.
|
* Takes a number of a unit and converts it to wei.
|
||||||
*
|
*
|
||||||
* Possible units are:
|
* Possible units are:
|
||||||
* - kwei/ada
|
* SI Short SI Full Effigy Other
|
||||||
* - mwei/babbage
|
* - kwei femtoether ada
|
||||||
* - gwei/shannon
|
* - mwei picoether babbage
|
||||||
* - szabo
|
* - gwei nanoether shannon
|
||||||
* - finney
|
* - -- microether szabo micro
|
||||||
* - ether
|
* - -- miliether finney mili
|
||||||
* - kether/grand/einstein
|
* - ether -- --
|
||||||
|
* - kether einstein grand
|
||||||
* - mether
|
* - mether
|
||||||
* - gether
|
* - gether
|
||||||
* - tether
|
* - tether
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue