aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2019-01-14 22:50:32 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2019-01-15 23:25:24 +0800
commitc3afc13dd660348e99b727c2dd01930eec8d99c3 (patch)
tree9a05e88e55200fdf72d08af10b5a753535e23256 /packages/website/ts
parentf570f80674c22f69712c45e8e3c48e948b51f357 (diff)
downloaddexon-0x-contracts-c3afc13dd660348e99b727c2dd01930eec8d99c3.tar.gz
dexon-0x-contracts-c3afc13dd660348e99b727c2dd01930eec8d99c3.tar.zst
dexon-0x-contracts-c3afc13dd660348e99b727c2dd01930eec8d99c3.zip
Upgrade bignumber.js version
Diffstat (limited to 'packages/website/ts')
-rw-r--r--packages/website/ts/blockchain.ts2
-rw-r--r--packages/website/ts/components/fill_order.tsx4
-rw-r--r--packages/website/ts/utils/utils.ts2
3 files changed, 4 insertions, 4 deletions
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts
index 37f746f7c..ea5a59340 100644
--- a/packages/website/ts/blockchain.ts
+++ b/packages/website/ts/blockchain.ts
@@ -944,7 +944,7 @@ export class Blockchain {
try {
const gasInfo = await backendClient.getGasInfoAsync();
const gasPriceInGwei = new BigNumber(gasInfo.fast / 10);
- const gasPriceInWei = gasPriceInGwei.mul(1000000000);
+ const gasPriceInWei = gasPriceInGwei.multipliedBy(1000000000);
this._defaultGasPrice = gasPriceInWei;
} catch (err) {
return;
diff --git a/packages/website/ts/components/fill_order.tsx b/packages/website/ts/components/fill_order.tsx
index 7fee8c4df..95a3671c4 100644
--- a/packages/website/ts/components/fill_order.tsx
+++ b/packages/website/ts/components/fill_order.tsx
@@ -205,7 +205,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
amount: orderMakerAmount
.times(takerAssetToken.amount)
.div(orderTakerAmount)
- .floor(),
+ .integerValue(BigNumber.ROUND_FLOOR),
symbol: makerToken.symbol,
};
const fillAssetToken = {
@@ -219,7 +219,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
const orderReceiveAmountBigNumber = orderMakerAmount
.times(this.props.orderFillAmount)
.dividedBy(orderTakerAmount)
- .floor();
+ .integerValue(BigNumber.ROUND_FLOOR);
orderReceiveAmount = this._formatCurrencyAmount(orderReceiveAmountBigNumber, makerToken.decimals);
}
const isUserMaker =
diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts
index 890f1553a..e84f9d0cc 100644
--- a/packages/website/ts/utils/utils.ts
+++ b/packages/website/ts/utils/utils.ts
@@ -394,7 +394,7 @@ export const utils = {
},
getUsdValueFormattedAmount(amount: BigNumber, decimals: number, price: BigNumber): string {
const unitAmount = Web3Wrapper.toUnitAmount(amount, decimals);
- const value = unitAmount.mul(price);
+ const value = unitAmount.multipliedBy(price);
return utils.format(value, constants.NUMERAL_USD_FORMAT);
},
openUrl(url: string): void {