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/eth_weth_conversion_button.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/eth_weth_conversion_button.tsx')
-rw-r--r-- | packages/website/ts/components/eth_weth_conversion_button.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/website/ts/components/eth_weth_conversion_button.tsx b/packages/website/ts/components/eth_weth_conversion_button.tsx index e8db42a7a..4b91a2ebd 100644 --- a/packages/website/ts/components/eth_weth_conversion_button.tsx +++ b/packages/website/ts/components/eth_weth_conversion_button.tsx @@ -1,5 +1,5 @@ -import { ZeroEx } from '0x.js'; import { BigNumber, logUtils } from '@0xproject/utils'; +import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as _ from 'lodash'; import RaisedButton from 'material-ui/RaisedButton'; import * as React from 'react'; @@ -95,11 +95,11 @@ export class EthWethConversionButton extends React.Component< try { if (direction === Side.Deposit) { await this.props.blockchain.convertEthToWrappedEthTokensAsync(token.address, value); - const ethAmount = ZeroEx.toUnitAmount(value, constants.DECIMAL_PLACES_ETH); + const ethAmount = Web3Wrapper.toUnitAmount(value, constants.DECIMAL_PLACES_ETH); this.props.dispatcher.showFlashMessage(`Successfully wrapped ${ethAmount.toString()} ETH to WETH`); } else { await this.props.blockchain.convertWrappedEthTokensToEthAsync(token.address, value); - const tokenAmount = ZeroEx.toUnitAmount(value, token.decimals); + const tokenAmount = Web3Wrapper.toUnitAmount(value, token.decimals); this.props.dispatcher.showFlashMessage(`Successfully unwrapped ${tokenAmount.toString()} WETH to ETH`); } if (!this.props.isOutdatedWrappedEther) { |