diff options
author | Fabio Berger <me@fabioberger.com> | 2018-05-25 07:31:21 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-05-25 07:31:21 +0800 |
commit | 4e5bfae332279acbb58d76a32102b5a27dde069d (patch) | |
tree | e613c1a5ebba642a171f0817ef8c336088091543 /packages/contracts/test/exchange/libs.ts | |
parent | 662dc1287737aa02c0c822d7c53be114230422c0 (diff) | |
parent | 895a9093aa5f204f9f7ad0fedb2934a8b6c40b17 (diff) | |
download | dexon-sol-tools-4e5bfae332279acbb58d76a32102b5a27dde069d.tar dexon-sol-tools-4e5bfae332279acbb58d76a32102b5a27dde069d.tar.gz dexon-sol-tools-4e5bfae332279acbb58d76a32102b5a27dde069d.tar.bz2 dexon-sol-tools-4e5bfae332279acbb58d76a32102b5a27dde069d.tar.lz dexon-sol-tools-4e5bfae332279acbb58d76a32102b5a27dde069d.tar.xz dexon-sol-tools-4e5bfae332279acbb58d76a32102b5a27dde069d.tar.zst dexon-sol-tools-4e5bfae332279acbb58d76a32102b5a27dde069d.zip |
Merge branch 'v2-prototype' into refactor/order-utils/for-v2
* v2-prototype:
Temporarily disable installation tests
Use domain separator for exchange address
publicGetOrderSchemaHash -> getOrderSchemaHash
Update order hash to match latest eip712
Pin connect in sra-report
Fix a typo
Pin types in sra-report
Fix linter issues
Unpin types version in @0xproject/connect
Pin types version in website
Do a fake version bump on types so that yarn doesn't try to install updated version for not yet migrated packages
Migrate migrations to v2
Diffstat (limited to 'packages/contracts/test/exchange/libs.ts')
-rw-r--r-- | packages/contracts/test/exchange/libs.ts | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/packages/contracts/test/exchange/libs.ts b/packages/contracts/test/exchange/libs.ts index 5c530a9b1..bbca54274 100644 --- a/packages/contracts/test/exchange/libs.ts +++ b/packages/contracts/test/exchange/libs.ts @@ -1,4 +1,5 @@ import { BlockchainLifecycle } from '@0xproject/dev-utils'; +import { SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; import ethUtil = require('ethereumjs-util'); @@ -11,7 +12,6 @@ import { chaiSetup } from '../../src/utils/chai_setup'; import { constants } from '../../src/utils/constants'; import { OrderFactory } from '../../src/utils/order_factory'; import { orderUtils } from '../../src/utils/order_utils'; -import { SignedOrder } from '../../src/utils/types'; import { provider, txDefaults, web3Wrapper } from '../../src/utils/web3_wrapper'; chaiSetup.configure(); @@ -56,8 +56,20 @@ describe('Exchange libs', () => { }); describe('LibOrder', () => { + describe('getOrderSchema', () => { + it('should output the correct order schema hash', async () => { + const orderSchema = await libs.getOrderSchemaHash.callAsync(); + expect(orderUtils.getOrderSchemaHex()).to.be.equal(orderSchema); + }); + }); + describe('getDomainSeparatorSchema', () => { + it('should output the correct domain separator schema hash', async () => { + const domainSeparatorSchema = await libs.getDomainSeparatorSchemaHash.callAsync(); + expect(orderUtils.getDomainSeparatorSchemaHex()).to.be.equal(domainSeparatorSchema); + }); + }); describe('getOrderHash', () => { - it('should output the correct orderHash', async () => { + it('should output the correct order hash', async () => { const orderHashHex = await libs.publicGetOrderHash.callAsync(signedOrder); expect(orderUtils.getOrderHashHex(signedOrder)).to.be.equal(orderHashHex); }); |