aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test
diff options
context:
space:
mode:
authorJacob Evans <jacob@dekz.net>2018-06-05 09:40:07 +0800
committerJacob Evans <jacob@dekz.net>2018-06-06 05:08:04 +0800
commita59e9f024e76122c76600d938b565ea47938b287 (patch)
tree749c1485efeca041aa319e64af64aedd579dd8d6 /packages/contracts/test
parent4670cc1a5f04d61045a82b4a3bbcf56e009afd56 (diff)
downloaddexon-sol-tools-a59e9f024e76122c76600d938b565ea47938b287.tar
dexon-sol-tools-a59e9f024e76122c76600d938b565ea47938b287.tar.gz
dexon-sol-tools-a59e9f024e76122c76600d938b565ea47938b287.tar.bz2
dexon-sol-tools-a59e9f024e76122c76600d938b565ea47938b287.tar.lz
dexon-sol-tools-a59e9f024e76122c76600d938b565ea47938b287.tar.xz
dexon-sol-tools-a59e9f024e76122c76600d938b565ea47938b287.tar.zst
dexon-sol-tools-a59e9f024e76122c76600d938b565ea47938b287.zip
Update Order utils to use eip712
Diffstat (limited to 'packages/contracts/test')
-rw-r--r--packages/contracts/test/exchange/core.ts5
-rw-r--r--packages/contracts/test/exchange/libs.ts9
2 files changed, 6 insertions, 8 deletions
diff --git a/packages/contracts/test/exchange/core.ts b/packages/contracts/test/exchange/core.ts
index 91ead93f0..6d62c2b86 100644
--- a/packages/contracts/test/exchange/core.ts
+++ b/packages/contracts/test/exchange/core.ts
@@ -1,5 +1,5 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils';
-import { assetProxyUtils, crypto, orderHashUtils } from '@0xproject/order-utils';
+import { assetProxyUtils, orderHashUtils } from '@0xproject/order-utils';
import { AssetProxyId, SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
@@ -24,8 +24,7 @@ import { ERC20Wrapper } from '../../src/utils/erc20_wrapper';
import { ERC721Wrapper } from '../../src/utils/erc721_wrapper';
import { ExchangeWrapper } from '../../src/utils/exchange_wrapper';
import { OrderFactory } from '../../src/utils/order_factory';
-import { orderUtils } from '../../src/utils/order_utils';
-import { ContractName, ERC20BalancesByOwner, OrderStatus } from '../../src/utils/types';
+import { ERC20BalancesByOwner } from '../../src/utils/types';
import { provider, txDefaults, web3Wrapper } from '../../src/utils/web3_wrapper';
chaiSetup.configure();
diff --git a/packages/contracts/test/exchange/libs.ts b/packages/contracts/test/exchange/libs.ts
index b6de4d3b0..ac9020bce 100644
--- a/packages/contracts/test/exchange/libs.ts
+++ b/packages/contracts/test/exchange/libs.ts
@@ -1,5 +1,5 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils';
-import { assetProxyUtils, orderHashUtils } from '@0xproject/order-utils';
+import { assetProxyUtils, EIP712Utils, orderHashUtils } from '@0xproject/order-utils';
import { SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai';
@@ -10,7 +10,6 @@ import { addressUtils } from '../../src/utils/address_utils';
import { artifacts } from '../../src/utils/artifacts';
import { chaiSetup } from '../../src/utils/chai_setup';
import { constants } from '../../src/utils/constants';
-import { EIP712Utils } from '../../src/utils/eip712_utils';
import { OrderFactory } from '../../src/utils/order_factory';
import { provider, txDefaults, web3Wrapper } from '../../src/utils/web3_wrapper';
@@ -58,15 +57,15 @@ describe('Exchange libs', () => {
describe('getOrderSchema', () => {
it('should output the correct order schema hash', async () => {
const orderSchema = await libs.getOrderSchemaHash.callAsync();
- const orderSchemaBuffer = orderHashUtils._getOrderSchemaHex();
- const schemaHashHex = `0x${orderSchemaBuffer.toString('hex')}`;
+ const schemaHashBuffer = orderHashUtils._getOrderSchemaBuffer();
+ const schemaHashHex = `0x${schemaHashBuffer.toString('hex')}`;
expect(schemaHashHex).to.be.equal(orderSchema);
});
});
describe('getDomainSeparatorSchema', () => {
it('should output the correct domain separator schema hash', async () => {
const domainSeparatorSchema = await libs.getDomainSeparatorSchemaHash.callAsync();
- const domainSchemaBuffer = EIP712Utils.getDomainSeparatorSchemaBuffer();
+ const domainSchemaBuffer = EIP712Utils._getDomainSeparatorSchemaBuffer();
const schemaHashHex = `0x${domainSchemaBuffer.toString('hex')}`;
expect(schemaHashHex).to.be.equal(domainSeparatorSchema);
});