diff options
author | Fabio Berger <me@fabioberger.com> | 2018-03-11 05:43:13 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-03-11 05:43:13 +0800 |
commit | 4c08667a078ac9ca1ed5dc62d87a8cfe3b903741 (patch) | |
tree | 24e217526229e119908e963230f1290299229a9a /packages/website/ts/components/eth_wrappers.tsx | |
parent | 4ac6b6828c30f2ec78bbea66b324c505641f24c3 (diff) | |
download | dexon-0x-contracts-4c08667a078ac9ca1ed5dc62d87a8cfe3b903741.tar dexon-0x-contracts-4c08667a078ac9ca1ed5dc62d87a8cfe3b903741.tar.gz dexon-0x-contracts-4c08667a078ac9ca1ed5dc62d87a8cfe3b903741.tar.bz2 dexon-0x-contracts-4c08667a078ac9ca1ed5dc62d87a8cfe3b903741.tar.lz dexon-0x-contracts-4c08667a078ac9ca1ed5dc62d87a8cfe3b903741.tar.xz dexon-0x-contracts-4c08667a078ac9ca1ed5dc62d87a8cfe3b903741.tar.zst dexon-0x-contracts-4c08667a078ac9ca1ed5dc62d87a8cfe3b903741.zip |
Replace local PRECISION constants with global config.AMOUNT_DISPLAY_PRECISION
Diffstat (limited to 'packages/website/ts/components/eth_wrappers.tsx')
-rw-r--r-- | packages/website/ts/components/eth_wrappers.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/website/ts/components/eth_wrappers.tsx b/packages/website/ts/components/eth_wrappers.tsx index 8aac31917..327d7bd7f 100644 --- a/packages/website/ts/components/eth_wrappers.tsx +++ b/packages/website/ts/components/eth_wrappers.tsx @@ -15,7 +15,6 @@ import { configs } from 'ts/utils/configs'; import { constants } from 'ts/utils/constants'; import { utils } from 'ts/utils/utils'; -const PRECISION = 5; const DATE_FORMAT = 'D/M/YY'; const ICON_DIMENSION = 40; const ETHER_ICON_PATH = '/images/ether.png'; @@ -147,7 +146,9 @@ export class EthWrappers extends React.Component<EthWrappersProps, EthWrappersSt </div> </div> </TableRowColumn> - <TableRowColumn>{userEtherBalanceInEth.toFixed(PRECISION)} ETH</TableRowColumn> + <TableRowColumn> + {userEtherBalanceInEth.toFixed(configs.AMOUNT_DISPLAY_PRECSION)} ETH + </TableRowColumn> <TableRowColumn> <EthWethConversionButton refetchEthTokenStateAsync={this._refetchEthTokenStateAsync.bind(this)} @@ -169,7 +170,7 @@ export class EthWrappers extends React.Component<EthWrappersProps, EthWrappersSt </TableRowColumn> <TableRowColumn> {this.state.isWethStateLoaded ? ( - `${wethBalance.toFixed(PRECISION)} WETH` + `${wethBalance.toFixed(configs.AMOUNT_DISPLAY_PRECSION)} WETH` ) : ( <i className="zmdi zmdi-spinner zmdi-hc-spin" /> )} @@ -269,7 +270,7 @@ export class EthWrappers extends React.Component<EthWrappersProps, EthWrappersSt const outdatedEtherTokenState = this.state.outdatedWETHStateByAddress[outdatedWETHIfExists.address]; const balanceInEthIfExists = isStateLoaded ? ZeroEx.toUnitAmount(outdatedEtherTokenState.balance, constants.DECIMAL_PLACES_ETH).toFixed( - PRECISION, + configs.AMOUNT_DISPLAY_PRECSION, ) : undefined; const onConversionSuccessful = this._onOutdatedConversionSuccessfulAsync.bind( |