From 0cf99271328a0bee0730a33659fe30aa426c59da Mon Sep 17 00:00:00 2001
From: fragosti <francesco.agosti93@gmail.com>
Date: Fri, 15 Jun 2018 18:02:33 -0700
Subject: Add all steps to their own file

---
 packages/website/ts/components/wallet/wallet.tsx | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

(limited to 'packages/website/ts/components/wallet/wallet.tsx')

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>;
         }
     }
-- 
cgit 

