aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test/exchange/transactions.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-05-31 05:45:20 +0800
committerFabio Berger <me@fabioberger.com>2018-05-31 05:45:20 +0800
commit9200ed2216688410a95175bab460d262fc52a591 (patch)
tree82677b3cc9be709458d1c40eeac9e2057db1c28d /packages/contracts/test/exchange/transactions.ts
parente1f7dd1372d2639a5f72705b089bb2250a2fe361 (diff)
downloaddexon-sol-tools-9200ed2216688410a95175bab460d262fc52a591.tar
dexon-sol-tools-9200ed2216688410a95175bab460d262fc52a591.tar.gz
dexon-sol-tools-9200ed2216688410a95175bab460d262fc52a591.tar.bz2
dexon-sol-tools-9200ed2216688410a95175bab460d262fc52a591.tar.lz
dexon-sol-tools-9200ed2216688410a95175bab460d262fc52a591.tar.xz
dexon-sol-tools-9200ed2216688410a95175bab460d262fc52a591.tar.zst
dexon-sol-tools-9200ed2216688410a95175bab460d262fc52a591.zip
Introduce OrderWithoutExchangeAddress type since this is what get's sent to the smart contracts
Diffstat (limited to 'packages/contracts/test/exchange/transactions.ts')
-rw-r--r--packages/contracts/test/exchange/transactions.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/contracts/test/exchange/transactions.ts b/packages/contracts/test/exchange/transactions.ts
index 3f884a6c3..7ee194aa1 100644
--- a/packages/contracts/test/exchange/transactions.ts
+++ b/packages/contracts/test/exchange/transactions.ts
@@ -1,5 +1,6 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils';
-import { AssetProxyId, Order, SignatureType, SignedOrder } from '@0xproject/types';
+import { assetProxyUtils } from '@0xproject/order-utils';
+import { AssetProxyId, Order, OrderWithoutExchangeAddress, SignatureType, SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai';
import * as ethUtil from 'ethereumjs-util';
@@ -9,7 +10,6 @@ import { DummyERC20TokenContract } from '../../src/contract_wrappers/generated/d
import { ERC20ProxyContract } from '../../src/contract_wrappers/generated/e_r_c20_proxy';
import { ExchangeContract } from '../../src/contract_wrappers/generated/exchange';
import { artifacts } from '../../src/utils/artifacts';
-import { assetProxyUtils } from '@0xproject/order-utils';
import { chaiSetup } from '../../src/utils/chai_setup';
import { constants } from '../../src/utils/constants';
import { ERC20Wrapper } from '../../src/utils/erc20_wrapper';
@@ -40,7 +40,7 @@ describe('Exchange transactions', () => {
let erc20Balances: ERC20BalancesByOwner;
let signedOrder: SignedOrder;
let signedTx: SignedTransaction;
- let order: Order;
+ let orderWithoutExchangeAddress: OrderWithoutExchangeAddress;
let orderFactory: OrderFactory;
let makerTransactionFactory: TransactionFactory;
let takerTransactionFactory: TransactionFactory;
@@ -111,11 +111,11 @@ describe('Exchange transactions', () => {
beforeEach(async () => {
erc20Balances = await erc20Wrapper.getBalancesAsync();
signedOrder = orderFactory.newSignedOrder();
- order = orderUtils.getOrderStruct(signedOrder);
+ orderWithoutExchangeAddress = orderUtils.getOrderWithoutExchangeAddress(signedOrder);
takerAssetFillAmount = signedOrder.takerAssetAmount.div(2);
const data = exchange.fillOrder.getABIEncodedTransactionData(
- order,
+ orderWithoutExchangeAddress,
takerAssetFillAmount,
signedOrder.signature,
);
@@ -179,7 +179,7 @@ describe('Exchange transactions', () => {
describe('cancelOrder', () => {
beforeEach(async () => {
- const data = exchange.cancelOrder.getABIEncodedTransactionData(order);
+ const data = exchange.cancelOrder.getABIEncodedTransactionData(orderWithoutExchangeAddress);
signedTx = makerTransactionFactory.newSignedTransaction(data);
});