diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-06-16 09:02:33 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-06-16 09:02:46 +0800 |
commit | 0cf99271328a0bee0730a33659fe30aa426c59da (patch) | |
tree | b43aab0830f07095790fa81be52a1ec8f59d24bb /packages/website/ts/components/wallet | |
parent | 5993125cc7d5129aead37a06663741d42ff0189e (diff) | |
download | dexon-0x-contracts-0cf99271328a0bee0730a33659fe30aa426c59da.tar dexon-0x-contracts-0cf99271328a0bee0730a33659fe30aa426c59da.tar.gz dexon-0x-contracts-0cf99271328a0bee0730a33659fe30aa426c59da.tar.bz2 dexon-0x-contracts-0cf99271328a0bee0730a33659fe30aa426c59da.tar.lz dexon-0x-contracts-0cf99271328a0bee0730a33659fe30aa426c59da.tar.xz dexon-0x-contracts-0cf99271328a0bee0730a33659fe30aa426c59da.tar.zst dexon-0x-contracts-0cf99271328a0bee0730a33659fe30aa426c59da.zip |
Add all steps to their own file
Diffstat (limited to 'packages/website/ts/components/wallet')
-rw-r--r-- | packages/website/ts/components/wallet/wallet.tsx | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx index 4523b0ac9..3a6d9942d 100644 --- a/packages/website/ts/components/wallet/wallet.tsx +++ b/packages/website/ts/components/wallet/wallet.tsx @@ -124,7 +124,6 @@ const styles: Styles = { const ETHER_ICON_PATH = '/images/ether.png'; const ICON_DIMENSION = 28; -const TOKEN_AMOUNT_DISPLAY_PRECISION = 5; const BODY_ITEM_KEY = 'BODY'; const HEADER_ITEM_KEY = 'HEADER'; const FOOTER_ITEM_KEY = 'FOOTER'; @@ -438,10 +437,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> { </PlaceHolder> ); } else { - const unitAmount = Web3Wrapper.toUnitAmount(amount, decimals); - const precision = Math.min(TOKEN_AMOUNT_DISPLAY_PRECISION, unitAmount.decimalPlaces()); - const formattedAmount = unitAmount.toFixed(precision); - const result = `${formattedAmount} ${symbol}`; + const result = utils.getFormattedAmount(amount, decimals, symbol); return <div style={styles.amountLabel}>{result}</div>; } } |