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/trade_history | |
parent | 4ac6b6828c30f2ec78bbea66b324c505641f24c3 (diff) | |
download | dexon-0x-contracts-4c08667a078ac9ca1ed5dc62d87a8cfe3b903741.tar.gz 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/trade_history')
-rw-r--r-- | packages/website/ts/components/trade_history/trade_history_item.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/website/ts/components/trade_history/trade_history_item.tsx b/packages/website/ts/components/trade_history/trade_history_item.tsx index 6b8d7c7b5..dbe72259b 100644 --- a/packages/website/ts/components/trade_history/trade_history_item.tsx +++ b/packages/website/ts/components/trade_history/trade_history_item.tsx @@ -9,8 +9,8 @@ import * as ReactTooltip from 'react-tooltip'; import { EtherScanIcon } from 'ts/components/ui/etherscan_icon'; import { Party } from 'ts/components/ui/party'; import { Fill, Token, TokenByAddress } from 'ts/types'; +import { configs } from 'ts/utils/configs'; -const PRECISION = 5; const IDENTICON_DIAMETER = 40; interface TradeHistoryItemProps { @@ -131,7 +131,7 @@ export class TradeHistoryItem extends React.Component<TradeHistoryItemProps, Tra {this._renderAmount(givenAmount, givenToken.symbol, givenToken.decimals)} </div> <div style={{ color: colors.grey400, fontSize: 14 }}> - {exchangeRate.toFixed(PRECISION)} {givenToken.symbol}/{receiveToken.symbol} + {exchangeRate.toFixed(configs.AMOUNT_DISPLAY_PRECSION)} {givenToken.symbol}/{receiveToken.symbol} </div> </div> ); @@ -163,7 +163,7 @@ export class TradeHistoryItem extends React.Component<TradeHistoryItemProps, Tra const unitAmount = ZeroEx.toUnitAmount(amount, decimals); return ( <span> - {unitAmount.toFixed(PRECISION)} {symbol} + {unitAmount.toFixed(configs.AMOUNT_DISPLAY_PRECSION)} {symbol} </span> ); } |