aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/conversion-util.js
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-09-01 03:34:22 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-09-13 10:48:52 +0800
commit084158f1a2af9d117c054420e895f4ae76a94df0 (patch)
tree1f822718e3ee315bf1d8f8f0c3aec4ec7242dbef /ui/app/conversion-util.js
parent8143f7725a21aa48c00b59402a79a3d3918ae601 (diff)
downloadtangerine-wallet-browser-084158f1a2af9d117c054420e895f4ae76a94df0.tar
tangerine-wallet-browser-084158f1a2af9d117c054420e895f4ae76a94df0.tar.gz
tangerine-wallet-browser-084158f1a2af9d117c054420e895f4ae76a94df0.tar.bz2
tangerine-wallet-browser-084158f1a2af9d117c054420e895f4ae76a94df0.tar.lz
tangerine-wallet-browser-084158f1a2af9d117c054420e895f4ae76a94df0.tar.xz
tangerine-wallet-browser-084158f1a2af9d117c054420e895f4ae76a94df0.tar.zst
tangerine-wallet-browser-084158f1a2af9d117c054420e895f4ae76a94df0.zip
Add tests for TransactionActivityLog. Make changes to rendering events
Diffstat (limited to 'ui/app/conversion-util.js')
-rw-r--r--ui/app/conversion-util.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/app/conversion-util.js b/ui/app/conversion-util.js
index 38f5f1c50..f271b5683 100644
--- a/ui/app/conversion-util.js
+++ b/ui/app/conversion-util.js
@@ -35,6 +35,7 @@ BigNumber.config({
// Big Number Constants
const BIG_NUMBER_WEI_MULTIPLIER = new BigNumber('1000000000000000000')
const BIG_NUMBER_GWEI_MULTIPLIER = new BigNumber('1000000000')
+const BIG_NUMBER_ETH_MULTIPLIER = new BigNumber('1')
// Individual Setters
const convert = R.invoker(1, 'times')
@@ -52,10 +53,12 @@ const toBigNumber = {
const toNormalizedDenomination = {
WEI: bigNumber => bigNumber.div(BIG_NUMBER_WEI_MULTIPLIER),
GWEI: bigNumber => bigNumber.div(BIG_NUMBER_GWEI_MULTIPLIER),
+ ETH: bigNumber => bigNumber.div(BIG_NUMBER_ETH_MULTIPLIER),
}
const toSpecifiedDenomination = {
WEI: bigNumber => bigNumber.times(BIG_NUMBER_WEI_MULTIPLIER).round(),
GWEI: bigNumber => bigNumber.times(BIG_NUMBER_GWEI_MULTIPLIER).round(9),
+ ETH: bigNumber => bigNumber.times(BIG_NUMBER_ETH_MULTIPLIER).round(9),
}
const baseChange = {
hex: n => n.toString(16),