aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test/exchange/transactions.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-19 23:48:06 +0800
committerFabio Berger <me@fabioberger.com>2018-07-19 23:48:06 +0800
commitd8898cf9a30cc349868afcf2b78e6369e57aa726 (patch)
treef96d1aa76c7e5aa9e3311d5cdbd0d31c8ec8d7fb /packages/contracts/test/exchange/transactions.ts
parent1aaf633df883f62fad890b2d87a2dc89067821c5 (diff)
parent3de88d5345c7a4549bc69e2ca28f0601f5d42189 (diff)
downloaddexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.tar
dexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.tar.gz
dexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.tar.bz2
dexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.tar.lz
dexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.tar.xz
dexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.tar.zst
dexon-sol-tools-d8898cf9a30cc349868afcf2b78e6369e57aa726.zip
merge v2-prototype
Diffstat (limited to 'packages/contracts/test/exchange/transactions.ts')
-rw-r--r--packages/contracts/test/exchange/transactions.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/packages/contracts/test/exchange/transactions.ts b/packages/contracts/test/exchange/transactions.ts
index 0d66b11b8..2bdd96b16 100644
--- a/packages/contracts/test/exchange/transactions.ts
+++ b/packages/contracts/test/exchange/transactions.ts
@@ -1,5 +1,5 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils';
-import { assetProxyUtils, generatePseudoRandomSalt } from '@0xproject/order-utils';
+import { assetDataUtils, generatePseudoRandomSalt } from '@0xproject/order-utils';
import { OrderWithoutExchangeAddress, RevertReason, SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai';
@@ -88,7 +88,7 @@ describe('Exchange transactions', () => {
artifacts.Exchange,
provider,
txDefaults,
- assetProxyUtils.encodeERC20AssetData(zrxToken.address),
+ assetDataUtils.encodeERC20AssetData(zrxToken.address),
);
exchangeWrapper = new ExchangeWrapper(exchange, provider);
await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, owner);
@@ -107,8 +107,8 @@ describe('Exchange transactions', () => {
exchangeAddress: exchange.address,
makerAddress,
feeRecipientAddress,
- makerAssetData: assetProxyUtils.encodeERC20AssetData(defaultMakerTokenAddress),
- takerAssetData: assetProxyUtils.encodeERC20AssetData(defaultTakerTokenAddress),
+ makerAssetData: assetDataUtils.encodeERC20AssetData(defaultMakerTokenAddress),
+ takerAssetData: assetDataUtils.encodeERC20AssetData(defaultTakerTokenAddress),
};
makerPrivateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(makerAddress)];
takerPrivateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(takerAddress)];
@@ -121,7 +121,7 @@ describe('Exchange transactions', () => {
let takerAssetFillAmount: BigNumber;
beforeEach(async () => {
erc20Balances = await erc20Wrapper.getBalancesAsync();
- signedOrder = orderFactory.newSignedOrder();
+ signedOrder = await orderFactory.newSignedOrderAsync();
orderWithoutExchangeAddress = orderUtils.getOrderWithoutExchangeAddress(signedOrder);
takerAssetFillAmount = signedOrder.takerAssetAmount.div(2);
@@ -226,7 +226,7 @@ describe('Exchange transactions', () => {
it("should cancel an order if called from the order's sender", async () => {
const orderSalt = new BigNumber(0);
- signedOrder = orderFactory.newSignedOrder({
+ signedOrder = await orderFactory.newSignedOrderAsync({
senderAddress: exchangeWrapperContract.address,
salt: orderSalt,
});
@@ -265,7 +265,7 @@ describe('Exchange transactions', () => {
it("should not cancel an order if not called from the order's sender", async () => {
const orderSalt = new BigNumber(0);
- signedOrder = orderFactory.newSignedOrder({
+ signedOrder = await orderFactory.newSignedOrderAsync({
senderAddress: exchangeWrapperContract.address,
salt: orderSalt,
});
@@ -349,14 +349,14 @@ describe('Exchange transactions', () => {
exchangeAddress: exchange.address,
makerAddress,
feeRecipientAddress,
- makerAssetData: assetProxyUtils.encodeERC20AssetData(defaultMakerTokenAddress),
- takerAssetData: assetProxyUtils.encodeERC20AssetData(defaultTakerTokenAddress),
+ makerAssetData: assetDataUtils.encodeERC20AssetData(defaultMakerTokenAddress),
+ takerAssetData: assetDataUtils.encodeERC20AssetData(defaultTakerTokenAddress),
};
whitelistOrderFactory = new OrderFactory(makerPrivateKey, defaultOrderParams);
});
beforeEach(async () => {
- signedOrder = whitelistOrderFactory.newSignedOrder();
+ signedOrder = await whitelistOrderFactory.newSignedOrderAsync();
erc20Balances = await erc20Wrapper.getBalancesAsync();
});