aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils
diff options
context:
space:
mode:
Diffstat (limited to 'test/utils')
-rw-r--r--test/utils/fill_scenarios.ts32
-rw-r--r--test/utils/order_factory.ts12
2 files changed, 22 insertions, 22 deletions
diff --git a/test/utils/fill_scenarios.ts b/test/utils/fill_scenarios.ts
index c399c7bf4..a0632b12c 100644
--- a/test/utils/fill_scenarios.ts
+++ b/test/utils/fill_scenarios.ts
@@ -1,4 +1,4 @@
-import * as BigNumber from 'bignumber.js';
+import BigNumber from 'bignumber.js';
import {ZeroEx, Token, SignedOrder} from '../../src';
import {orderFactory} from '../utils/order_factory';
import {constants} from './constants';
@@ -21,8 +21,8 @@ export class FillScenarios {
}
public async createFillableSignedOrderAsync(makerTokenAddress: string, takerTokenAddress: string,
makerAddress: string, takerAddress: string,
- fillableAmount: BigNumber.BigNumber,
- expirationUnixTimestampSec?: BigNumber.BigNumber):
+ fillableAmount: BigNumber,
+ expirationUnixTimestampSec?: BigNumber):
Promise<SignedOrder> {
return this.createAsymmetricFillableSignedOrderAsync(
makerTokenAddress, takerTokenAddress, makerAddress, takerAddress,
@@ -31,10 +31,10 @@ export class FillScenarios {
}
public async createFillableSignedOrderWithFeesAsync(
makerTokenAddress: string, takerTokenAddress: string,
- makerFee: BigNumber.BigNumber, takerFee: BigNumber.BigNumber,
+ makerFee: BigNumber, takerFee: BigNumber,
makerAddress: string, takerAddress: string,
- fillableAmount: BigNumber.BigNumber,
- feeRecepient: string, expirationUnixTimestampSec?: BigNumber.BigNumber,
+ fillableAmount: BigNumber,
+ feeRecepient: string, expirationUnixTimestampSec?: BigNumber,
): Promise<SignedOrder> {
return this.createAsymmetricFillableSignedOrderWithFeesAsync(
makerTokenAddress, takerTokenAddress, makerFee, takerFee, makerAddress, takerAddress,
@@ -43,8 +43,8 @@ export class FillScenarios {
}
public async createAsymmetricFillableSignedOrderAsync(
makerTokenAddress: string, takerTokenAddress: string, makerAddress: string, takerAddress: string,
- makerFillableAmount: BigNumber.BigNumber, takerFillableAmount: BigNumber.BigNumber,
- expirationUnixTimestampSec?: BigNumber.BigNumber): Promise<SignedOrder> {
+ makerFillableAmount: BigNumber, takerFillableAmount: BigNumber,
+ expirationUnixTimestampSec?: BigNumber): Promise<SignedOrder> {
const makerFee = new BigNumber(0);
const takerFee = new BigNumber(0);
const feeRecepient = constants.NULL_ADDRESS;
@@ -54,8 +54,8 @@ export class FillScenarios {
);
}
public async createPartiallyFilledSignedOrderAsync(makerTokenAddress: string, takerTokenAddress: string,
- takerAddress: string, fillableAmount: BigNumber.BigNumber,
- partialFillAmount: BigNumber.BigNumber) {
+ takerAddress: string, fillableAmount: BigNumber,
+ partialFillAmount: BigNumber) {
const [makerAddress] = this.userAddresses;
const signedOrder = await this.createAsymmetricFillableSignedOrderAsync(
makerTokenAddress, takerTokenAddress, makerAddress, takerAddress,
@@ -69,10 +69,10 @@ export class FillScenarios {
}
private async createAsymmetricFillableSignedOrderWithFeesAsync(
makerTokenAddress: string, takerTokenAddress: string,
- makerFee: BigNumber.BigNumber, takerFee: BigNumber.BigNumber,
+ makerFee: BigNumber, takerFee: BigNumber,
makerAddress: string, takerAddress: string,
- makerFillableAmount: BigNumber.BigNumber, takerFillableAmount: BigNumber.BigNumber,
- feeRecepient: string, expirationUnixTimestampSec?: BigNumber.BigNumber): Promise<SignedOrder> {
+ makerFillableAmount: BigNumber, takerFillableAmount: BigNumber,
+ feeRecepient: string, expirationUnixTimestampSec?: BigNumber): Promise<SignedOrder> {
await Promise.all([
this.increaseBalanceAndAllowanceAsync(makerTokenAddress, makerAddress, makerFillableAmount),
@@ -90,7 +90,7 @@ export class FillScenarios {
return signedOrder;
}
private async increaseBalanceAndAllowanceAsync(
- tokenAddress: string, address: string, amount: BigNumber.BigNumber): Promise<void> {
+ tokenAddress: string, address: string, amount: BigNumber): Promise<void> {
if (amount.isZero() || address === ZeroEx.NULL_ADDRESS) {
return; // noop
}
@@ -100,11 +100,11 @@ export class FillScenarios {
]);
}
private async increaseBalanceAsync(
- tokenAddress: string, address: string, amount: BigNumber.BigNumber): Promise<void> {
+ tokenAddress: string, address: string, amount: BigNumber): Promise<void> {
await this.zeroEx.token.transferAsync(tokenAddress, this.coinbase, address, amount);
}
private async increaseAllowanceAsync(
- tokenAddress: string, address: string, amount: BigNumber.BigNumber): Promise<void> {
+ tokenAddress: string, address: string, amount: BigNumber): Promise<void> {
const oldMakerAllowance = await this.zeroEx.token.getProxyAllowanceAsync(tokenAddress, address);
const newMakerAllowance = oldMakerAllowance.plus(amount);
await this.zeroEx.token.setProxyAllowanceAsync(
diff --git a/test/utils/order_factory.ts b/test/utils/order_factory.ts
index fc4adebd9..6086e09f7 100644
--- a/test/utils/order_factory.ts
+++ b/test/utils/order_factory.ts
@@ -1,5 +1,5 @@
import * as _ from 'lodash';
-import * as BigNumber from 'bignumber.js';
+import BigNumber from 'bignumber.js';
import {ZeroEx, SignedOrder} from '../../src';
export const orderFactory = {
@@ -7,15 +7,15 @@ export const orderFactory = {
zeroEx: ZeroEx,
maker: string,
taker: string,
- makerFee: BigNumber.BigNumber,
- takerFee: BigNumber.BigNumber,
- makerTokenAmount: BigNumber.BigNumber,
+ makerFee: BigNumber,
+ takerFee: BigNumber,
+ makerTokenAmount: BigNumber,
makerTokenAddress: string,
- takerTokenAmount: BigNumber.BigNumber,
+ takerTokenAmount: BigNumber,
takerTokenAddress: string,
exchangeContractAddress: string,
feeRecipient: string,
- expirationUnixTimestampSec?: BigNumber.BigNumber): Promise<SignedOrder> {
+ expirationUnixTimestampSec?: BigNumber): Promise<SignedOrder> {
const defaultExpirationUnixTimestampSec = new BigNumber(2524604400); // Close to infinite
expirationUnixTimestampSec = _.isUndefined(expirationUnixTimestampSec) ?
defaultExpirationUnixTimestampSec :