Merge pull request #305 from 0xProject/fix/bignumber_config
Use configured version of bignumber in all packages
This commit is contained in:
		@@ -3,9 +3,8 @@
 | 
				
			|||||||
 * Templates can be found at https://github.com/0xProject/0x.js/tree/development/packages/abi-gen-templates.
 | 
					 * Templates can be found at https://github.com/0xProject/0x.js/tree/development/packages/abi-gen-templates.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
// tslint:disable-next-line:no-unused-variable
 | 
					// tslint:disable-next-line:no-unused-variable
 | 
				
			||||||
import {TxData, TxDataPayable} from '@0xproject/types';
 | 
					import { TxData, TxDataPayable } from '@0xproject/types';
 | 
				
			||||||
import {classUtils, promisify} from '@0xproject/utils';
 | 
					import { BigNumber, classUtils, promisify } from '@0xproject/utils';
 | 
				
			||||||
import {BigNumber} from 'bignumber.js';
 | 
					 | 
				
			||||||
import * as Web3 from 'web3';
 | 
					import * as Web3 from 'web3';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import {BaseContract} from './base_contract';
 | 
					import {BaseContract} from './base_contract';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -88,7 +88,6 @@
 | 
				
			|||||||
    "@0xproject/json-schemas": "^0.7.1",
 | 
					    "@0xproject/json-schemas": "^0.7.1",
 | 
				
			||||||
    "@0xproject/utils": "^0.1.2",
 | 
					    "@0xproject/utils": "^0.1.2",
 | 
				
			||||||
    "@0xproject/web3-wrapper": "^0.1.2",
 | 
					    "@0xproject/web3-wrapper": "^0.1.2",
 | 
				
			||||||
    "bignumber.js": "~4.1.0",
 | 
					 | 
				
			||||||
    "bintrees": "^1.0.2",
 | 
					    "bintrees": "^1.0.2",
 | 
				
			||||||
    "bn.js": "^4.11.8",
 | 
					    "bn.js": "^4.11.8",
 | 
				
			||||||
    "compare-versions": "^3.0.1",
 | 
					    "compare-versions": "^3.0.1",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,6 @@
 | 
				
			|||||||
import { schemas, SchemaValidator } from '@0xproject/json-schemas';
 | 
					import { schemas, SchemaValidator } from '@0xproject/json-schemas';
 | 
				
			||||||
import { bigNumberConfigs, intervalUtils } from '@0xproject/utils';
 | 
					import { BigNumber, intervalUtils } from '@0xproject/utils';
 | 
				
			||||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
 | 
					import { Web3Wrapper } from '@0xproject/web3-wrapper';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					 | 
				
			||||||
import * as ethUtil from 'ethereumjs-util';
 | 
					import * as ethUtil from 'ethereumjs-util';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -29,9 +28,6 @@ import { decorators } from './utils/decorators';
 | 
				
			|||||||
import { signatureUtils } from './utils/signature_utils';
 | 
					import { signatureUtils } from './utils/signature_utils';
 | 
				
			||||||
import { utils } from './utils/utils';
 | 
					import { utils } from './utils/utils';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Customize our BigNumber instances
 | 
					 | 
				
			||||||
bigNumberConfigs.configure();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * The ZeroEx class is the single entry-point into the 0x.js library. It contains all of the library's functionality
 | 
					 * The ZeroEx class is the single entry-point into the 0x.js library. It contains all of the library's functionality
 | 
				
			||||||
 * and all calls to the library should be made through a ZeroEx instance.
 | 
					 * and all calls to the library should be made through a ZeroEx instance.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
import { schemas } from '@0xproject/json-schemas';
 | 
					import { schemas } from '@0xproject/json-schemas';
 | 
				
			||||||
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
 | 
					import { Web3Wrapper } from '@0xproject/web3-wrapper';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { artifacts } from '../artifacts';
 | 
					import { artifacts } from '../artifacts';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
import { schemas } from '@0xproject/json-schemas';
 | 
					import { schemas } from '@0xproject/json-schemas';
 | 
				
			||||||
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
 | 
					import { Web3Wrapper } from '@0xproject/web3-wrapper';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import * as Web3 from 'web3';
 | 
					import * as Web3 from 'web3';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
import { schemas } from '@0xproject/json-schemas';
 | 
					import { schemas } from '@0xproject/json-schemas';
 | 
				
			||||||
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
 | 
					import { Web3Wrapper } from '@0xproject/web3-wrapper';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { artifacts } from '../artifacts';
 | 
					import { artifacts } from '../artifacts';
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								packages/0x.js/src/globalsAugment.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								packages/0x.js/src/globalsAugment.d.ts
									
									
									
									
										vendored
									
									
								
							@@ -1,4 +1,4 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// HACK: This module overrides the Chai namespace so that we can use BigNumber types inside.
 | 
					// HACK: This module overrides the Chai namespace so that we can use BigNumber types inside.
 | 
				
			||||||
// Source: https://github.com/Microsoft/TypeScript/issues/7352#issuecomment-191547232
 | 
					// Source: https://github.com/Microsoft/TypeScript/issues/7352#issuecomment-191547232
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,4 @@
 | 
				
			|||||||
import { intervalUtils } from '@0xproject/utils';
 | 
					import { BigNumber, intervalUtils } from '@0xproject/utils';
 | 
				
			||||||
import { BigNumber } from 'bignumber.js';
 | 
					 | 
				
			||||||
import { RBTree } from 'bintrees';
 | 
					import { RBTree } from 'bintrees';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { SignedOrder } from '../types';
 | 
					import { SignedOrder } from '../types';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { TokenWrapper } from '../contract_wrappers/token_wrapper';
 | 
					import { TokenWrapper } from '../contract_wrappers/token_wrapper';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { ExchangeWrapper } from '../contract_wrappers/exchange_wrapper';
 | 
					import { ExchangeWrapper } from '../contract_wrappers/exchange_wrapper';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { TransactionReceipt } from '@0xproject/types';
 | 
					import { TransactionReceipt } from '@0xproject/types';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as Web3 from 'web3';
 | 
					import * as Web3 from 'web3';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export enum ZeroExError {
 | 
					export enum ZeroExError {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import * as Web3 from 'web3';
 | 
					import * as Web3 from 'web3';
 | 
				
			||||||
import * as SolidityCoder from 'web3/lib/solidity/coder';
 | 
					import * as SolidityCoder from 'web3/lib/solidity/coder';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,9 +2,9 @@ import { assert as sharedAssert } from '@0xproject/assert';
 | 
				
			|||||||
// We need those two unused imports because they're actually used by sharedAssert which gets injected here
 | 
					// We need those two unused imports because they're actually used by sharedAssert which gets injected here
 | 
				
			||||||
// tslint:disable-next-line:no-unused-variable
 | 
					// tslint:disable-next-line:no-unused-variable
 | 
				
			||||||
import { Schema } from '@0xproject/json-schemas';
 | 
					import { Schema } from '@0xproject/json-schemas';
 | 
				
			||||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
 | 
					 | 
				
			||||||
// tslint:disable-next-line:no-unused-variable
 | 
					// tslint:disable-next-line:no-unused-variable
 | 
				
			||||||
import * as BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
 | 
					import { Web3Wrapper } from '@0xproject/web3-wrapper';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { ECSignature } from '../types';
 | 
					import { ECSignature } from '../types';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const constants = {
 | 
					export const constants = {
 | 
				
			||||||
    NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
 | 
					    NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { TokenWrapper } from '../contract_wrappers/token_wrapper';
 | 
					import { TokenWrapper } from '../contract_wrappers/token_wrapper';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { ZeroEx } from '../0x';
 | 
					import { ZeroEx } from '../0x';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { ZeroEx } from '../0x';
 | 
					import { ZeroEx } from '../0x';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import BN = require('bn.js');
 | 
					import BN = require('bn.js');
 | 
				
			||||||
import * as ethABI from 'ethereumjs-abi';
 | 
					import * as ethABI from 'ethereumjs-abi';
 | 
				
			||||||
import * as ethUtil from 'ethereumjs-util';
 | 
					import * as ethUtil from 'ethereumjs-util';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { BlockchainLifecycle } from '@0xproject/dev-utils';
 | 
					import { BlockchainLifecycle } from '@0xproject/dev-utils';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as chai from 'chai';
 | 
					import * as chai from 'chai';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import 'mocha';
 | 
					import 'mocha';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { BlockchainLifecycle } from '@0xproject/dev-utils';
 | 
					import { BlockchainLifecycle } from '@0xproject/dev-utils';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as chai from 'chai';
 | 
					import * as chai from 'chai';
 | 
				
			||||||
import 'mocha';
 | 
					import 'mocha';
 | 
				
			||||||
import * as Web3 from 'web3';
 | 
					import * as Web3 from 'web3';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { BlockchainLifecycle } from '@0xproject/dev-utils';
 | 
					import { BlockchainLifecycle } from '@0xproject/dev-utils';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as chai from 'chai';
 | 
					import * as chai from 'chai';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { ExchangeContractErrs, Token, ZeroEx } from '../src';
 | 
					import { ExchangeContractErrs, Token, ZeroEx } from '../src';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { BlockchainLifecycle } from '@0xproject/dev-utils';
 | 
					import { BlockchainLifecycle } from '@0xproject/dev-utils';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as chai from 'chai';
 | 
					import * as chai from 'chai';
 | 
				
			||||||
import 'mocha';
 | 
					import 'mocha';
 | 
				
			||||||
import * as Web3 from 'web3';
 | 
					import * as Web3 from 'web3';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { BlockchainLifecycle } from '@0xproject/dev-utils';
 | 
					import { BlockchainLifecycle } from '@0xproject/dev-utils';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as chai from 'chai';
 | 
					import * as chai from 'chai';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import 'mocha';
 | 
					import 'mocha';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { BlockchainLifecycle } from '@0xproject/dev-utils';
 | 
					import { BlockchainLifecycle } from '@0xproject/dev-utils';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as chai from 'chai';
 | 
					import * as chai from 'chai';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import 'mocha';
 | 
					import 'mocha';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { BlockchainLifecycle } from '@0xproject/dev-utils';
 | 
					import { BlockchainLifecycle } from '@0xproject/dev-utils';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as chai from 'chai';
 | 
					import * as chai from 'chai';
 | 
				
			||||||
import * as Sinon from 'sinon';
 | 
					import * as Sinon from 'sinon';
 | 
				
			||||||
import * as Web3 from 'web3';
 | 
					import * as Web3 from 'web3';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as chai from 'chai';
 | 
					import * as chai from 'chai';
 | 
				
			||||||
import 'mocha';
 | 
					import 'mocha';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { BlockchainLifecycle } from '@0xproject/dev-utils';
 | 
					import { BlockchainLifecycle } from '@0xproject/dev-utils';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as chai from 'chai';
 | 
					import * as chai from 'chai';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import 'mocha';
 | 
					import 'mocha';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
import { BlockchainLifecycle } from '@0xproject/dev-utils';
 | 
					import { BlockchainLifecycle } from '@0xproject/dev-utils';
 | 
				
			||||||
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
 | 
					import { Web3Wrapper } from '@0xproject/web3-wrapper';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					 | 
				
			||||||
import * as chai from 'chai';
 | 
					import * as chai from 'chai';
 | 
				
			||||||
import 'mocha';
 | 
					import 'mocha';
 | 
				
			||||||
import * as Web3 from 'web3';
 | 
					import * as Web3 from 'web3';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
 | 
					import { Web3Wrapper } from '@0xproject/web3-wrapper';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { SignedOrder, Token, ZeroEx } from '../../src';
 | 
					import { SignedOrder, Token, ZeroEx } from '../../src';
 | 
				
			||||||
import { artifacts } from '../../src/artifacts';
 | 
					import { artifacts } from '../../src/artifacts';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { SignedOrder, ZeroEx } from '../../src';
 | 
					import { SignedOrder, ZeroEx } from '../../src';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,7 +22,7 @@
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  "homepage": "https://github.com/0xProject/0x.js/packages/abi-gen/README.md",
 | 
					  "homepage": "https://github.com/0xProject/0x.js/packages/abi-gen/README.md",
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
    "bignumber.js": "~4.1.0",
 | 
					    "@0xproject/utils": "^0.1.2",
 | 
				
			||||||
    "chalk": "^2.3.0",
 | 
					    "chalk": "^2.3.0",
 | 
				
			||||||
    "glob": "^7.1.2",
 | 
					    "glob": "^7.1.2",
 | 
				
			||||||
    "handlebars": "^4.0.11",
 | 
					    "handlebars": "^4.0.11",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -11,7 +11,9 @@ export const utils = {
 | 
				
			|||||||
        if (solType.match(trailingArrayRegex)) {
 | 
					        if (solType.match(trailingArrayRegex)) {
 | 
				
			||||||
            const arrayItemSolType = solType.replace(trailingArrayRegex, '');
 | 
					            const arrayItemSolType = solType.replace(trailingArrayRegex, '');
 | 
				
			||||||
            const arrayItemTsType = utils.solTypeToTsType(paramKind, arrayItemSolType);
 | 
					            const arrayItemTsType = utils.solTypeToTsType(paramKind, arrayItemSolType);
 | 
				
			||||||
            const arrayTsType = `(${arrayItemTsType})[]`;
 | 
					            const arrayTsType = utils.isUnionType(arrayItemTsType)
 | 
				
			||||||
 | 
					                ? `Array<${arrayItemTsType}>`
 | 
				
			||||||
 | 
					                : `${arrayItemTsType}[]`;
 | 
				
			||||||
            return arrayTsType;
 | 
					            return arrayTsType;
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            const solTypeRegexToTsType = [
 | 
					            const solTypeRegexToTsType = [
 | 
				
			||||||
@@ -38,6 +40,9 @@ export const utils = {
 | 
				
			|||||||
            throw new Error(`Unknown Solidity type found: ${solType}`);
 | 
					            throw new Error(`Unknown Solidity type found: ${solType}`);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    isUnionType(tsType: string): boolean {
 | 
				
			||||||
 | 
					        return tsType === 'number|BigNumber';
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    log(...args: any[]): void {
 | 
					    log(...args: any[]): void {
 | 
				
			||||||
        console.log(...args); // tslint:disable-line:no-console
 | 
					        console.log(...args); // tslint:disable-line:no-console
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -39,7 +39,6 @@
 | 
				
			|||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
    "@0xproject/json-schemas": "^0.7.1",
 | 
					    "@0xproject/json-schemas": "^0.7.1",
 | 
				
			||||||
    "@0xproject/utils": "^0.1.2",
 | 
					    "@0xproject/utils": "^0.1.2",
 | 
				
			||||||
    "bignumber.js": "~4.1.0",
 | 
					 | 
				
			||||||
    "lodash": "^4.17.4",
 | 
					    "lodash": "^4.17.4",
 | 
				
			||||||
    "valid-url": "^1.0.9"
 | 
					    "valid-url": "^1.0.9"
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,5 @@
 | 
				
			|||||||
import { Schema, SchemaValidator } from '@0xproject/json-schemas';
 | 
					import { Schema, SchemaValidator } from '@0xproject/json-schemas';
 | 
				
			||||||
import { addressUtils } from '@0xproject/utils';
 | 
					import { addressUtils, BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import * as validUrl from 'valid-url';
 | 
					import * as validUrl from 'valid-url';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { schemas } from '@0xproject/json-schemas';
 | 
					import { schemas } from '@0xproject/json-schemas';
 | 
				
			||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as chai from 'chai';
 | 
					import * as chai from 'chai';
 | 
				
			||||||
import * as dirtyChai from 'dirty-chai';
 | 
					import * as dirtyChai from 'dirty-chai';
 | 
				
			||||||
import 'mocha';
 | 
					import 'mocha';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -39,7 +39,6 @@
 | 
				
			|||||||
    "@0xproject/assert": "^0.0.9",
 | 
					    "@0xproject/assert": "^0.0.9",
 | 
				
			||||||
    "@0xproject/json-schemas": "^0.7.1",
 | 
					    "@0xproject/json-schemas": "^0.7.1",
 | 
				
			||||||
    "@0xproject/utils": "^0.1.2",
 | 
					    "@0xproject/utils": "^0.1.2",
 | 
				
			||||||
    "bignumber.js": "~4.1.0",
 | 
					 | 
				
			||||||
    "isomorphic-fetch": "^2.2.1",
 | 
					    "isomorphic-fetch": "^2.2.1",
 | 
				
			||||||
    "lodash": "^4.17.4",
 | 
					    "lodash": "^4.17.4",
 | 
				
			||||||
    "query-string": "^5.0.1",
 | 
					    "query-string": "^5.0.1",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,3 @@
 | 
				
			|||||||
import { bigNumberConfigs } from '@0xproject/utils';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Customize our BigNumber instances
 | 
					 | 
				
			||||||
bigNumberConfigs.configure();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export { HttpClient } from './http_client';
 | 
					export { HttpClient } from './http_client';
 | 
				
			||||||
export { WebSocketOrderbookChannel } from './ws_orderbook_channel';
 | 
					export { WebSocketOrderbookChannel } from './ws_orderbook_channel';
 | 
				
			||||||
export {
 | 
					export {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// TODO: Consolidate Order, SignedOrder and ECSignature into a shared package instead of duplicating them from 0x.js
 | 
					// TODO: Consolidate Order, SignedOrder and ECSignature into a shared package instead of duplicating them from 0x.js
 | 
				
			||||||
export interface Order {
 | 
					export interface Order {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const typeConverters = {
 | 
					export const typeConverters = {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { FeesResponse } from '../../../src/types';
 | 
					import { FeesResponse } from '../../../src/types';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const orderResponse = {
 | 
					export const orderResponse = {
 | 
				
			||||||
    maker: '0x9e56625509c2f60af937f23b7b532600390e8c8b',
 | 
					    maker: '0x9e56625509c2f60af937f23b7b532600390e8c8b',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const orderbookResponse = {
 | 
					export const orderbookResponse = {
 | 
				
			||||||
    bids: [
 | 
					    bids: [
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const ordersResponse = [
 | 
					export const ordersResponse = [
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { TokenPairsItem } from '../../../src/types';
 | 
					import { TokenPairsItem } from '../../../src/types';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as chai from 'chai';
 | 
					import * as chai from 'chai';
 | 
				
			||||||
import * as chaiAsPromised from 'chai-as-promised';
 | 
					import * as chaiAsPromised from 'chai-as-promised';
 | 
				
			||||||
import * as dirtyChai from 'dirty-chai';
 | 
					import * as dirtyChai from 'dirty-chai';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
 | 
					import { Web3Wrapper } from '@0xproject/web3-wrapper';
 | 
				
			||||||
import { BigNumber } from 'bignumber.js';
 | 
					 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import * as path from 'path';
 | 
					import * as path from 'path';
 | 
				
			||||||
import * as Web3 from 'web3';
 | 
					import * as Web3 from 'web3';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
 | 
					import { Web3Wrapper } from '@0xproject/web3-wrapper';
 | 
				
			||||||
import { BigNumber } from 'bignumber.js';
 | 
					 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { Deployer } from './../src/deployer';
 | 
					import { Deployer } from './../src/deployer';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const constants = {
 | 
					export const constants = {
 | 
				
			||||||
    networkId: 0,
 | 
					    networkId: 0,
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								packages/contracts/globalsAugment.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								packages/contracts/globalsAugment.d.ts
									
									
									
									
										vendored
									
									
								
							@@ -1,4 +1,4 @@
 | 
				
			|||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// HACK: This module overrides the Chai namespace so that we can use BigNumber types inside.
 | 
					// HACK: This module overrides the Chai namespace so that we can use BigNumber types inside.
 | 
				
			||||||
// Source: https://github.com/Microsoft/TypeScript/issues/7352#issuecomment-191547232
 | 
					// Source: https://github.com/Microsoft/TypeScript/issues/7352#issuecomment-191547232
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -59,7 +59,6 @@
 | 
				
			|||||||
    "@0xproject/json-schemas": "^0.7.1",
 | 
					    "@0xproject/json-schemas": "^0.7.1",
 | 
				
			||||||
    "@0xproject/utils": "^0.1.2",
 | 
					    "@0xproject/utils": "^0.1.2",
 | 
				
			||||||
    "@0xproject/web3-wrapper": "^0.1.2",
 | 
					    "@0xproject/web3-wrapper": "^0.1.2",
 | 
				
			||||||
    "bignumber.js": "~4.1.0",
 | 
					 | 
				
			||||||
    "bluebird": "^3.5.0",
 | 
					    "bluebird": "^3.5.0",
 | 
				
			||||||
    "bn.js": "^4.11.8",
 | 
					    "bn.js": "^4.11.8",
 | 
				
			||||||
    "ethereumjs-abi": "^0.6.4",
 | 
					    "ethereumjs-abi": "^0.6.4",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,5 @@
 | 
				
			|||||||
import { ZeroEx, ZeroExError } from '0x.js';
 | 
					import { ZeroEx, ZeroExError } from '0x.js';
 | 
				
			||||||
import { promisify } from '@0xproject/utils';
 | 
					import { BigNumber, promisify } from '@0xproject/utils';
 | 
				
			||||||
import { BigNumber } from 'bignumber.js';
 | 
					 | 
				
			||||||
import * as chai from 'chai';
 | 
					import * as chai from 'chai';
 | 
				
			||||||
import Web3 = require('web3');
 | 
					import Web3 = require('web3');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { ZeroEx } from '0x.js';
 | 
					import { ZeroEx } from '0x.js';
 | 
				
			||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as chai from 'chai';
 | 
					import * as chai from 'chai';
 | 
				
			||||||
import ethUtil = require('ethereumjs-util');
 | 
					import ethUtil = require('ethereumjs-util');
 | 
				
			||||||
import * as Web3 from 'web3';
 | 
					import * as Web3 from 'web3';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { ZeroEx } from '0x.js';
 | 
					import { ZeroEx } from '0x.js';
 | 
				
			||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as chai from 'chai';
 | 
					import * as chai from 'chai';
 | 
				
			||||||
import ethUtil = require('ethereumjs-util');
 | 
					import ethUtil = require('ethereumjs-util');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { ZeroEx } from '0x.js';
 | 
					import { ZeroEx } from '0x.js';
 | 
				
			||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as chai from 'chai';
 | 
					import * as chai from 'chai';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,5 @@
 | 
				
			|||||||
import { RPC } from '@0xproject/dev-utils';
 | 
					import { RPC } from '@0xproject/dev-utils';
 | 
				
			||||||
import { promisify } from '@0xproject/utils';
 | 
					import { BigNumber, promisify } from '@0xproject/utils';
 | 
				
			||||||
import { BigNumber } from 'bignumber.js';
 | 
					 | 
				
			||||||
import * as chai from 'chai';
 | 
					import * as chai from 'chai';
 | 
				
			||||||
import Web3 = require('web3');
 | 
					import Web3 = require('web3');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { ZeroEx } from '0x.js';
 | 
					import { ZeroEx } from '0x.js';
 | 
				
			||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as chai from 'chai';
 | 
					import * as chai from 'chai';
 | 
				
			||||||
import * as Web3 from 'web3';
 | 
					import * as Web3 from 'web3';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { ZeroEx } from '0x.js';
 | 
					import { ZeroEx } from '0x.js';
 | 
				
			||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as chai from 'chai';
 | 
					import * as chai from 'chai';
 | 
				
			||||||
import * as Web3 from 'web3';
 | 
					import * as Web3 from 'web3';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { ZeroEx } from '0x.js';
 | 
					import { ZeroEx } from '0x.js';
 | 
				
			||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as chai from 'chai';
 | 
					import * as chai from 'chai';
 | 
				
			||||||
import Web3 = require('web3');
 | 
					import Web3 = require('web3');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,11 +1,8 @@
 | 
				
			|||||||
import { bigNumberConfigs } from '@0xproject/utils';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import { BigNumber } from 'bignumber.js';
 | 
					 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { BalancesByOwner, ContractInstance } from './types';
 | 
					import { BalancesByOwner, ContractInstance } from './types';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bigNumberConfigs.configure();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export class Balances {
 | 
					export class Balances {
 | 
				
			||||||
    private _tokenContractInstances: ContractInstance[];
 | 
					    private _tokenContractInstances: ContractInstance[];
 | 
				
			||||||
    private _ownerAddresses: string[];
 | 
					    private _ownerAddresses: string[];
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { formatters } from './formatters';
 | 
					import { formatters } from './formatters';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { Order } from './order';
 | 
					import { Order } from './order';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,4 @@
 | 
				
			|||||||
import { promisify } from '@0xproject/utils';
 | 
					import { BigNumber, promisify } from '@0xproject/utils';
 | 
				
			||||||
import { BigNumber } from 'bignumber.js';
 | 
					 | 
				
			||||||
import ethUtil = require('ethereumjs-util');
 | 
					import ethUtil = require('ethereumjs-util');
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import Web3 = require('web3');
 | 
					import Web3 = require('web3');
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { ZeroEx } from '0x.js';
 | 
					import { ZeroEx } from '0x.js';
 | 
				
			||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { Order } from './order';
 | 
					import { Order } from './order';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as Web3 from 'web3';
 | 
					import * as Web3 from 'web3';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface BalancesByOwner {
 | 
					export interface BalancesByOwner {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,7 +29,7 @@
 | 
				
			|||||||
    "typescript": "~2.6.1"
 | 
					    "typescript": "~2.6.1"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
    "bignumber.js": "~4.1.0",
 | 
					    "@0xproject/utils": "^0.1.2",
 | 
				
			||||||
    "ethereumjs-util": "^5.1.2",
 | 
					    "ethereumjs-util": "^5.1.2",
 | 
				
			||||||
    "lodash": "^4.17.4",
 | 
					    "lodash": "^4.17.4",
 | 
				
			||||||
    "request-promise-native": "^1.0.5"
 | 
					    "request-promise-native": "^1.0.5"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -32,7 +32,6 @@
 | 
				
			|||||||
    "@types/lodash.foreach": "^4.5.3",
 | 
					    "@types/lodash.foreach": "^4.5.3",
 | 
				
			||||||
    "@types/lodash.values": "^4.3.3",
 | 
					    "@types/lodash.values": "^4.3.3",
 | 
				
			||||||
    "@types/mocha": "^2.2.42",
 | 
					    "@types/mocha": "^2.2.42",
 | 
				
			||||||
    "bignumber.js": "~4.1.0",
 | 
					 | 
				
			||||||
    "chai": "^4.0.1",
 | 
					    "chai": "^4.0.1",
 | 
				
			||||||
    "chai-typescript-typings": "^0.0.1",
 | 
					    "chai-typescript-typings": "^0.0.1",
 | 
				
			||||||
    "dirty-chai": "^2.0.1",
 | 
					    "dirty-chai": "^2.0.1",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as chai from 'chai';
 | 
					import * as chai from 'chai';
 | 
				
			||||||
import * as dirtyChai from 'dirty-chai';
 | 
					import * as dirtyChai from 'dirty-chai';
 | 
				
			||||||
import forEach = require('lodash.foreach');
 | 
					import forEach = require('lodash.foreach');
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,7 +16,6 @@
 | 
				
			|||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
    "0x.js": "^0.29.0",
 | 
					    "0x.js": "^0.29.0",
 | 
				
			||||||
    "@0xproject/utils": "^0.1.2",
 | 
					    "@0xproject/utils": "^0.1.2",
 | 
				
			||||||
    "bignumber.js": "~4.1.0",
 | 
					 | 
				
			||||||
    "body-parser": "^1.17.1",
 | 
					    "body-parser": "^1.17.1",
 | 
				
			||||||
    "ethereumjs-tx": "^1.3.3",
 | 
					    "ethereumjs-tx": "^1.3.3",
 | 
				
			||||||
    "express": "^4.15.2",
 | 
					    "express": "^4.15.2",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { ZeroEx } from '0x.js';
 | 
					import { ZeroEx } from '0x.js';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { configs } from './configs';
 | 
					import { configs } from './configs';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,13 +20,12 @@
 | 
				
			|||||||
  "homepage": "https://github.com/0xProject/0x.js/packages/types/README.md",
 | 
					  "homepage": "https://github.com/0xProject/0x.js/packages/types/README.md",
 | 
				
			||||||
  "devDependencies": {
 | 
					  "devDependencies": {
 | 
				
			||||||
    "@0xproject/tslint-config": "^0.4.0",
 | 
					    "@0xproject/tslint-config": "^0.4.0",
 | 
				
			||||||
    "bignumber.js": "^5.0.0",
 | 
					 | 
				
			||||||
    "shx": "^0.2.2",
 | 
					    "shx": "^0.2.2",
 | 
				
			||||||
    "tslint": "5.8.0",
 | 
					    "tslint": "5.8.0",
 | 
				
			||||||
    "typescript": "~2.6.1"
 | 
					    "typescript": "~2.6.1"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
    "bignumber.js": "~4.1.0",
 | 
					    "@0xproject/utils": "^0.1.2",
 | 
				
			||||||
    "web3": "^0.20.0"
 | 
					    "web3": "^0.20.0"
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import { BigNumber } from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as Web3 from 'web3';
 | 
					import * as Web3 from 'web3';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface TxData {
 | 
					export interface TxData {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,11 +0,0 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export const bigNumberConfigs = {
 | 
					 | 
				
			||||||
    configure() {
 | 
					 | 
				
			||||||
        // By default BigNumber's `toString` method converts to exponential notation if the value has
 | 
					 | 
				
			||||||
        // more then 20 digits. We want to avoid this behavior, so we set EXPONENTIAL_AT to a high number
 | 
					 | 
				
			||||||
        BigNumber.config({
 | 
					 | 
				
			||||||
            EXPONENTIAL_AT: 1000,
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
							
								
								
									
										9
									
								
								packages/utils/src/configured_bignumber.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								packages/utils/src/configured_bignumber.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
				
			|||||||
 | 
					import { BigNumber } from 'bignumber.js';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// By default BigNumber's `toString` method converts to exponential notation if the value has
 | 
				
			||||||
 | 
					// more then 20 digits. We want to avoid this behavior, so we set EXPONENTIAL_AT to a high number
 | 
				
			||||||
 | 
					BigNumber.config({
 | 
				
			||||||
 | 
					    EXPONENTIAL_AT: 1000,
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export { BigNumber };
 | 
				
			||||||
@@ -2,4 +2,4 @@ export { promisify } from './promisify';
 | 
				
			|||||||
export { addressUtils } from './address_utils';
 | 
					export { addressUtils } from './address_utils';
 | 
				
			||||||
export { classUtils } from './class_utils';
 | 
					export { classUtils } from './class_utils';
 | 
				
			||||||
export { intervalUtils } from './interval_utils';
 | 
					export { intervalUtils } from './interval_utils';
 | 
				
			||||||
export { bigNumberConfigs } from './bignumber_config';
 | 
					export { BigNumber } from './configured_bignumber';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -30,7 +30,6 @@
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
    "@0xproject/utils": "^0.1.2",
 | 
					    "@0xproject/utils": "^0.1.2",
 | 
				
			||||||
    "bignumber.js": "~4.1.0",
 | 
					 | 
				
			||||||
    "lodash": "^4.17.4",
 | 
					    "lodash": "^4.17.4",
 | 
				
			||||||
    "web3": "^0.20.0"
 | 
					    "web3": "^0.20.0"
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,5 @@
 | 
				
			|||||||
import { TransactionReceipt, TxData } from '@0xproject/types';
 | 
					import { TransactionReceipt, TxData } from '@0xproject/types';
 | 
				
			||||||
import { bigNumberConfigs, promisify } from '@0xproject/utils';
 | 
					import { BigNumber, promisify } from '@0xproject/utils';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import * as Web3 from 'web3';
 | 
					import * as Web3 from 'web3';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -15,9 +14,6 @@ interface RawLogEntry {
 | 
				
			|||||||
    topics: string[];
 | 
					    topics: string[];
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Customize our BigNumber instances
 | 
					 | 
				
			||||||
bigNumberConfigs.configure();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export class Web3Wrapper {
 | 
					export class Web3Wrapper {
 | 
				
			||||||
    private _web3: Web3;
 | 
					    private _web3: Web3;
 | 
				
			||||||
    private _defaults: Partial<TxData>;
 | 
					    private _defaults: Partial<TxData>;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,7 +23,6 @@
 | 
				
			|||||||
    "@0xproject/utils": "^0.1.2",
 | 
					    "@0xproject/utils": "^0.1.2",
 | 
				
			||||||
    "accounting": "^0.4.1",
 | 
					    "accounting": "^0.4.1",
 | 
				
			||||||
    "basscss": "^8.0.3",
 | 
					    "basscss": "^8.0.3",
 | 
				
			||||||
    "bignumber.js": "~4.1.0",
 | 
					 | 
				
			||||||
    "blockies": "^0.0.2",
 | 
					    "blockies": "^0.0.2",
 | 
				
			||||||
    "compare-versions": "^3.0.1",
 | 
					    "compare-versions": "^3.0.1",
 | 
				
			||||||
    "dateformat": "^2.0.0",
 | 
					    "dateformat": "^2.0.0",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,8 +21,7 @@ import {
 | 
				
			|||||||
    LedgerWalletSubprovider,
 | 
					    LedgerWalletSubprovider,
 | 
				
			||||||
    RedundantRPCSubprovider,
 | 
					    RedundantRPCSubprovider,
 | 
				
			||||||
} from '@0xproject/subproviders';
 | 
					} from '@0xproject/subproviders';
 | 
				
			||||||
import { intervalUtils, promisify } from '@0xproject/utils';
 | 
					import { BigNumber, intervalUtils, promisify } from '@0xproject/utils';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import * as React from 'react';
 | 
					import * as React from 'react';
 | 
				
			||||||
import contract = require('truffle-contract');
 | 
					import contract = require('truffle-contract');
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import Dialog from 'material-ui/Dialog';
 | 
					import Dialog from 'material-ui/Dialog';
 | 
				
			||||||
import FlatButton from 'material-ui/FlatButton';
 | 
					import FlatButton from 'material-ui/FlatButton';
 | 
				
			||||||
import * as React from 'react';
 | 
					import * as React from 'react';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import Dialog from 'material-ui/Dialog';
 | 
					import Dialog from 'material-ui/Dialog';
 | 
				
			||||||
import FlatButton from 'material-ui/FlatButton';
 | 
					import FlatButton from 'material-ui/FlatButton';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import Dialog from 'material-ui/Dialog';
 | 
					import Dialog from 'material-ui/Dialog';
 | 
				
			||||||
import FlatButton from 'material-ui/FlatButton';
 | 
					import FlatButton from 'material-ui/FlatButton';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { ZeroEx } from '0x.js';
 | 
					import { ZeroEx } from '0x.js';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import RaisedButton from 'material-ui/RaisedButton';
 | 
					import RaisedButton from 'material-ui/RaisedButton';
 | 
				
			||||||
import * as React from 'react';
 | 
					import * as React from 'react';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { ZeroEx } from '0x.js';
 | 
					import { ZeroEx } from '0x.js';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import Divider from 'material-ui/Divider';
 | 
					import Divider from 'material-ui/Divider';
 | 
				
			||||||
import { Table, TableBody, TableHeader, TableHeaderColumn, TableRow, TableRowColumn } from 'material-ui/Table';
 | 
					import { Table, TableBody, TableHeader, TableHeaderColumn, TableRow, TableRowColumn } from 'material-ui/Table';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
import { Order as ZeroExOrder, ZeroEx } from '0x.js';
 | 
					import { Order as ZeroExOrder, ZeroEx } from '0x.js';
 | 
				
			||||||
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as accounting from 'accounting';
 | 
					import * as accounting from 'accounting';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import { Card, CardHeader, CardText } from 'material-ui/Card';
 | 
					import { Card, CardHeader, CardText } from 'material-ui/Card';
 | 
				
			||||||
import Divider from 'material-ui/Divider';
 | 
					import Divider from 'material-ui/Divider';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { ZeroEx } from '0x.js';
 | 
					import { ZeroEx } from '0x.js';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import Paper from 'material-ui/Paper';
 | 
					import Paper from 'material-ui/Paper';
 | 
				
			||||||
import TextField from 'material-ui/TextField';
 | 
					import TextField from 'material-ui/TextField';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { ZeroEx } from '0x.js';
 | 
					import { ZeroEx } from '0x.js';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import * as React from 'react';
 | 
					import * as React from 'react';
 | 
				
			||||||
import { Token } from 'ts/types';
 | 
					import { Token } from 'ts/types';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { Order, ZeroEx } from '0x.js';
 | 
					import { Order, ZeroEx } from '0x.js';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import Dialog from 'material-ui/Dialog';
 | 
					import Dialog from 'material-ui/Dialog';
 | 
				
			||||||
import Divider from 'material-ui/Divider';
 | 
					import Divider from 'material-ui/Divider';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import TextField from 'material-ui/TextField';
 | 
					import TextField from 'material-ui/TextField';
 | 
				
			||||||
import * as React from 'react';
 | 
					import * as React from 'react';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import Toggle from 'material-ui/Toggle';
 | 
					import Toggle from 'material-ui/Toggle';
 | 
				
			||||||
import * as React from 'react';
 | 
					import * as React from 'react';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import TextField from 'material-ui/TextField';
 | 
					import TextField from 'material-ui/TextField';
 | 
				
			||||||
import * as React from 'react';
 | 
					import * as React from 'react';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { ZeroEx } from '0x.js';
 | 
					import { ZeroEx } from '0x.js';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import * as React from 'react';
 | 
					import * as React from 'react';
 | 
				
			||||||
import { BalanceBoundedInput } from 'ts/components/inputs/balance_bounded_input';
 | 
					import { BalanceBoundedInput } from 'ts/components/inputs/balance_bounded_input';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import DatePicker from 'material-ui/DatePicker';
 | 
					import DatePicker from 'material-ui/DatePicker';
 | 
				
			||||||
import TimePicker from 'material-ui/TimePicker';
 | 
					import TimePicker from 'material-ui/TimePicker';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { ZeroEx } from '0x.js';
 | 
					import { ZeroEx } from '0x.js';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import * as React from 'react';
 | 
					import * as React from 'react';
 | 
				
			||||||
import { Link } from 'react-router-dom';
 | 
					import { Link } from 'react-router-dom';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import Paper from 'material-ui/Paper';
 | 
					import Paper from 'material-ui/Paper';
 | 
				
			||||||
import TextField from 'material-ui/TextField';
 | 
					import TextField from 'material-ui/TextField';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import Paper from 'material-ui/Paper';
 | 
					import Paper from 'material-ui/Paper';
 | 
				
			||||||
import * as React from 'react';
 | 
					import * as React from 'react';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import RaisedButton from 'material-ui/RaisedButton';
 | 
					import RaisedButton from 'material-ui/RaisedButton';
 | 
				
			||||||
import * as React from 'react';
 | 
					import * as React from 'react';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { ZeroEx } from '0x.js';
 | 
					import { ZeroEx } from '0x.js';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import DharmaLoanFrame from 'dharma-loan-frame';
 | 
					import DharmaLoanFrame from 'dharma-loan-frame';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import Dialog from 'material-ui/Dialog';
 | 
					import Dialog from 'material-ui/Dialog';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
import { ZeroEx } from '0x.js';
 | 
					import { ZeroEx } from '0x.js';
 | 
				
			||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import Paper from 'material-ui/Paper';
 | 
					import Paper from 'material-ui/Paper';
 | 
				
			||||||
import * as moment from 'moment';
 | 
					import * as moment from 'moment';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
import BigNumber from 'bignumber.js';
 | 
					import { BigNumber } from '@0xproject/utils';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
import * as React from 'react';
 | 
					import * as React from 'react';
 | 
				
			||||||
import { connect } from 'react-redux';
 | 
					import { connect } from 'react-redux';
 | 
				
			||||||
 
 | 
				
			|||||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user