aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils/test/eip712_utils_test.ts
diff options
context:
space:
mode:
authorHsuan Lee <hsuan@cobinhood.com>2019-01-19 18:42:04 +0800
committerHsuan Lee <hsuan@cobinhood.com>2019-01-19 18:42:04 +0800
commit7ae38906926dc09bc10670c361af0d2bf0050426 (patch)
tree5fb10ae366b987db09e4ddb4bc3ba0f75404ad08 /packages/order-utils/test/eip712_utils_test.ts
parentb5fd3c72a08aaa6957917d74c333387a16edf66b (diff)
downloaddexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar
dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.gz
dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.bz2
dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.lz
dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.xz
dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.zst
dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.zip
Update dependency packages
Diffstat (limited to 'packages/order-utils/test/eip712_utils_test.ts')
-rw-r--r--packages/order-utils/test/eip712_utils_test.ts44
1 files changed, 0 insertions, 44 deletions
diff --git a/packages/order-utils/test/eip712_utils_test.ts b/packages/order-utils/test/eip712_utils_test.ts
deleted file mode 100644
index a54e49958..000000000
--- a/packages/order-utils/test/eip712_utils_test.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import 'mocha';
-
-import { constants } from '../src/constants';
-import { eip712Utils } from '../src/eip712_utils';
-
-import { chaiSetup } from './utils/chai_setup';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-describe('EIP712 Utils', () => {
- describe('createTypedData', () => {
- it('adds in the EIP712DomainSeparator', () => {
- const primaryType = 'Test';
- const typedData = eip712Utils.createTypedData(
- primaryType,
- { Test: [{ name: 'testValue', type: 'uint256' }] },
- { testValue: '1' },
- constants.NULL_ADDRESS,
- );
- expect(typedData.domain).to.not.be.undefined();
- expect(typedData.types.EIP712Domain).to.not.be.undefined();
- const domainObject = typedData.domain;
- expect(domainObject.name).to.eq(constants.EIP712_DOMAIN_NAME);
- expect(typedData.primaryType).to.eq(primaryType);
- });
- });
- describe('createTypedData', () => {
- it('adds in the EIP712DomainSeparator', () => {
- const typedData = eip712Utils.createZeroExTransactionTypedData(
- {
- salt: new BigNumber('0'),
- data: constants.NULL_BYTES,
- signerAddress: constants.NULL_ADDRESS,
- },
- constants.NULL_ADDRESS,
- );
- expect(typedData.primaryType).to.eq(constants.EIP712_ZEROEX_TRANSACTION_SCHEMA.name);
- expect(typedData.types.EIP712Domain).to.not.be.undefined();
- });
- });
-});