aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test/exchange/libs.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-06-20 19:25:29 +0800
committerFabio Berger <me@fabioberger.com>2018-06-20 19:25:29 +0800
commit2ffab2218584fac5d3ea2b264a7c746d963083d9 (patch)
treef7558147b811c06300e2c7697591466ae7cf48ba /packages/contracts/test/exchange/libs.ts
parent5541327968ad6f974a37c49057253746f738a709 (diff)
parent096eaa20d785baee07b06b3f0848797e470fbda0 (diff)
downloaddexon-sol-tools-2ffab2218584fac5d3ea2b264a7c746d963083d9.tar
dexon-sol-tools-2ffab2218584fac5d3ea2b264a7c746d963083d9.tar.gz
dexon-sol-tools-2ffab2218584fac5d3ea2b264a7c746d963083d9.tar.bz2
dexon-sol-tools-2ffab2218584fac5d3ea2b264a7c746d963083d9.tar.lz
dexon-sol-tools-2ffab2218584fac5d3ea2b264a7c746d963083d9.tar.xz
dexon-sol-tools-2ffab2218584fac5d3ea2b264a7c746d963083d9.tar.zst
dexon-sol-tools-2ffab2218584fac5d3ea2b264a7c746d963083d9.zip
Merge branch 'v2-prototype' into feature/combinatorial-testing
* v2-prototype: (22 commits) Fix closing parens in liborder Update after rebase ERC721Proxy Always call safeTransferFrom Rename makerEpoch => orderEpoch Make cancelOrdersUpTo compatible with sender abstraction Update PR template Use Image component instead of img tag Assembler orderHash function Optimize and remove redundant encodePacked Fix linting issue Fix bug where we do fetch balances on wallet login Check network state immediately instead of waiting for delay Fix onboarding persisting when changing routes Consolidate account state messaging logic Only elevate wallet zIndex when onboarding is in progress Rebase and update feedback Run linter Add Portal v2 logging Simplified handling of source < 32 edge case Basic EIP712 encoder ...
Diffstat (limited to 'packages/contracts/test/exchange/libs.ts')
-rw-r--r--packages/contracts/test/exchange/libs.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/packages/contracts/test/exchange/libs.ts b/packages/contracts/test/exchange/libs.ts
index eff05981d..c08001198 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';
@@ -56,13 +56,17 @@ describe('Exchange libs', () => {
describe('getOrderSchema', () => {
it('should output the correct order schema hash', async () => {
const orderSchema = await libs.getOrderSchemaHash.callAsync();
- expect(orderHashUtils._getOrderSchemaHex()).to.be.equal(orderSchema);
+ 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();
- expect(orderHashUtils._getDomainSeparatorSchemaHex()).to.be.equal(domainSeparatorSchema);
+ const domainSchemaBuffer = EIP712Utils._getDomainSeparatorSchemaBuffer();
+ const schemaHashHex = `0x${domainSchemaBuffer.toString('hex')}`;
+ expect(schemaHashHex).to.be.equal(domainSeparatorSchema);
});
});
describe('getOrderHash', () => {