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/token_balances.tsx | |
parent | 4ac6b6828c30f2ec78bbea66b324c505641f24c3 (diff) | |
download | dexon-sol-tools-4c08667a078ac9ca1ed5dc62d87a8cfe3b903741.tar.gz dexon-sol-tools-4c08667a078ac9ca1ed5dc62d87a8cfe3b903741.tar.zst dexon-sol-tools-4c08667a078ac9ca1ed5dc62d87a8cfe3b903741.zip |
Replace local PRECISION constants with global config.AMOUNT_DISPLAY_PRECISION
Diffstat (limited to 'packages/website/ts/components/token_balances.tsx')
-rw-r--r-- | packages/website/ts/components/token_balances.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/website/ts/components/token_balances.tsx b/packages/website/ts/components/token_balances.tsx index 3c285803b..fe27bfa01 100644 --- a/packages/website/ts/components/token_balances.tsx +++ b/packages/website/ts/components/token_balances.tsx @@ -48,7 +48,6 @@ const ETHER_ICON_PATH = '/images/ether.png'; const ETHER_TOKEN_SYMBOL = 'WETH'; const ZRX_TOKEN_SYMBOL = 'ZRX'; -const PRECISION = 5; const ICON_DIMENSION = 40; const ARTIFICIAL_FAUCET_REQUEST_DELAY = 1000; const TOKEN_TABLE_ROW_HEIGHT = 60; @@ -248,7 +247,7 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala <img style={{ width: ICON_DIMENSION, height: ICON_DIMENSION }} src={ETHER_ICON_PATH} /> </TableRowColumn> <TableRowColumn> - {userEtherBalanceInEth.toFixed(PRECISION)} ETH + {userEtherBalanceInEth.toFixed(configs.AMOUNT_DISPLAY_PRECSION)} ETH {this.state.isBalanceSpinnerVisible && ( <span className="pl1"> <i className="zmdi zmdi-spinner zmdi-hc-spin" /> @@ -500,7 +499,7 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala } private _renderAmount(amount: BigNumber, decimals: number) { const unitAmount = ZeroEx.toUnitAmount(amount, decimals); - return unitAmount.toNumber().toFixed(PRECISION); + return unitAmount.toNumber().toFixed(configs.AMOUNT_DISPLAY_PRECSION); } private _renderTokenName(token: Token) { const tooltipId = `tooltip-${token.address}`; |