aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/utils
diff options
context:
space:
mode:
authorFrancesco Agosti <francesco.agosti93@gmail.com>2018-07-07 06:38:51 +0800
committerGitHub <noreply@github.com>2018-07-07 06:38:51 +0800
commit269b56b907f8af49e5d92bdcf3aedbc9af03e368 (patch)
tree8edcdaab384b8808f8f8520347e5cf6929f0c57e /packages/website/ts/utils
parente929fb4337b227bae55b1b8456b5035f7df5eb4f (diff)
parent60ebfcf36df3d2e4f15142823fb5821d8d65937e (diff)
downloaddexon-0x-contracts-269b56b907f8af49e5d92bdcf3aedbc9af03e368.tar
dexon-0x-contracts-269b56b907f8af49e5d92bdcf3aedbc9af03e368.tar.gz
dexon-0x-contracts-269b56b907f8af49e5d92bdcf3aedbc9af03e368.tar.bz2
dexon-0x-contracts-269b56b907f8af49e5d92bdcf3aedbc9af03e368.tar.lz
dexon-0x-contracts-269b56b907f8af49e5d92bdcf3aedbc9af03e368.tar.xz
dexon-0x-contracts-269b56b907f8af49e5d92bdcf3aedbc9af03e368.tar.zst
dexon-0x-contracts-269b56b907f8af49e5d92bdcf3aedbc9af03e368.zip
Merge pull request #838 from 0xProject/feature/website/portal-final-touches
Some final polish touches for portal!
Diffstat (limited to 'packages/website/ts/utils')
-rw-r--r--packages/website/ts/utils/utils.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts
index d50e9c619..6af7f5613 100644
--- a/packages/website/ts/utils/utils.ts
+++ b/packages/website/ts/utils/utils.ts
@@ -381,9 +381,9 @@ export const utils = {
return trackedTokens;
},
getFormattedAmountFromToken(token: Token, tokenState: TokenState): string {
- return utils.getFormattedAmount(tokenState.balance, token.decimals, token.symbol);
+ return utils.getFormattedAmount(tokenState.balance, token.decimals);
},
- getFormattedAmount(amount: BigNumber, decimals: number, symbol: string): string {
+ getFormattedAmount(amount: BigNumber, decimals: number): string {
const unitAmount = Web3Wrapper.toUnitAmount(amount, decimals);
// if the unit amount is less than 1, show the natural number of decimal places with a max of 4
// if the unit amount is greater than or equal to 1, show only 2 decimal places
@@ -392,7 +392,7 @@ export const utils = {
: 2;
const format = `0,0.${_.repeat('0', precision)}`;
const formattedAmount = numeral(unitAmount).format(format);
- return `${formattedAmount} ${symbol}`;
+ return formattedAmount;
},
getUsdValueFormattedAmount(amount: BigNumber, decimals: number, price: BigNumber): string {
const unitAmount = Web3Wrapper.toUnitAmount(amount, decimals);