aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/trade_history
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/components/trade_history')
-rw-r--r--packages/website/ts/components/trade_history/trade_history_item.tsx16
1 files changed, 11 insertions, 5 deletions
diff --git a/packages/website/ts/components/trade_history/trade_history_item.tsx b/packages/website/ts/components/trade_history/trade_history_item.tsx
index adca4d58c..321a8b0e1 100644
--- a/packages/website/ts/components/trade_history/trade_history_item.tsx
+++ b/packages/website/ts/components/trade_history/trade_history_item.tsx
@@ -1,6 +1,6 @@
-import { ZeroEx } from '0x.js';
import { colors, EtherscanLinkSuffixes } from '@0xproject/react-shared';
import { BigNumber } from '@0xproject/utils';
+import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
import Paper from 'material-ui/Paper';
import * as moment from 'moment';
@@ -90,10 +90,16 @@ export class TradeHistoryItem extends React.Component<TradeHistoryItemProps, Tra
}
private _renderAmounts(makerToken: Token, takerToken: Token): React.ReactNode {
const fill = this.props.fill;
- const filledTakerTokenAmountInUnits = ZeroEx.toUnitAmount(fill.filledTakerTokenAmount, takerToken.decimals);
- const filledMakerTokenAmountInUnits = ZeroEx.toUnitAmount(fill.filledMakerTokenAmount, takerToken.decimals);
+ const filledTakerTokenAmountInUnits = Web3Wrapper.toUnitAmount(
+ fill.filledTakerTokenAmount,
+ takerToken.decimals,
+ );
+ const filledMakerTokenAmountInUnits = Web3Wrapper.toUnitAmount(
+ fill.filledMakerTokenAmount,
+ takerToken.decimals,
+ );
let exchangeRate = filledTakerTokenAmountInUnits.div(filledMakerTokenAmountInUnits);
- const fillMakerTokenAmount = ZeroEx.toBaseUnitAmount(filledMakerTokenAmountInUnits, makerToken.decimals);
+ const fillMakerTokenAmount = Web3Wrapper.toBaseUnitAmount(filledMakerTokenAmountInUnits, makerToken.decimals);
let receiveAmount;
let receiveToken;
@@ -160,7 +166,7 @@ export class TradeHistoryItem extends React.Component<TradeHistoryItemProps, Tra
);
}
private _renderAmount(amount: BigNumber, symbol: string, decimals: number): React.ReactNode {
- const unitAmount = ZeroEx.toUnitAmount(amount, decimals);
+ const unitAmount = Web3Wrapper.toUnitAmount(amount, decimals);
return (
<span>
{unitAmount.toFixed(configs.AMOUNT_DISPLAY_PRECSION)} {symbol}