diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-23 07:18:52 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-24 00:41:35 +0800 |
commit | 5913d654bdf77d25b95570b1e656f63cc89ff97a (patch) | |
tree | 8cf3fd324cb7cd13e58f67eb3c0491bf5fa6ef18 /packages/website/ts/components/wallet/wallet.tsx | |
parent | f3fe9661f65f5ac58d45e965b7be02e9738df1c4 (diff) | |
download | dexon-sol-tools-5913d654bdf77d25b95570b1e656f63cc89ff97a.tar.gz dexon-sol-tools-5913d654bdf77d25b95570b1e656f63cc89ff97a.tar.zst dexon-sol-tools-5913d654bdf77d25b95570b1e656f63cc89ff97a.zip |
Remove 0x.js as a dependency from website
Diffstat (limited to 'packages/website/ts/components/wallet/wallet.tsx')
-rw-r--r-- | packages/website/ts/components/wallet/wallet.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx index dab8b7d2f..afcf3862f 100644 --- a/packages/website/ts/components/wallet/wallet.tsx +++ b/packages/website/ts/components/wallet/wallet.tsx @@ -1,4 +1,3 @@ -import { ZeroEx } from '0x.js'; import { constants as sharedConstants, EtherscanLinkSuffixes, @@ -6,6 +5,7 @@ import { utils as sharedUtils, } from '@0xproject/react-shared'; import { BigNumber } from '@0xproject/utils'; +import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as _ from 'lodash'; import FlatButton from 'material-ui/FlatButton'; import FloatingActionButton from 'material-ui/FloatingActionButton'; @@ -473,7 +473,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> { ); } private _renderAmount(amount: BigNumber, decimals: number, symbol: string): React.ReactNode { - const unitAmount = ZeroEx.toUnitAmount(amount, decimals); + const unitAmount = Web3Wrapper.toUnitAmount(amount, decimals); const formattedAmount = unitAmount.toPrecision(TOKEN_AMOUNT_DISPLAY_PRECISION); const result = `${formattedAmount} ${symbol}`; return <div style={styles.amountLabel}>{result}</div>; @@ -482,7 +482,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> { if (_.isUndefined(price)) { return null; } - const unitAmount = ZeroEx.toUnitAmount(amount, decimals); + const unitAmount = Web3Wrapper.toUnitAmount(amount, decimals); const value = unitAmount.mul(price); const formattedAmount = value.toFixed(USD_DECIMAL_PLACES); const result = `$${formattedAmount}`; |