Use configured version of bignumber in all packages

This commit is contained in:
Leonid Logvinov 2018-01-04 12:38:19 +01:00
parent ce6abad97f
commit 4dfa720f2d
No known key found for this signature in database
GPG Key ID: 0DD294BFDE8C95D4
108 changed files with 107 additions and 139 deletions

View File

@ -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';

View File

@ -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",

View File

@ -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.

View File

@ -1,6 +1,6 @@
import { schemas } from '@0xproject/json-schemas'; import { schemas } from '@0xproject/json-schemas';
import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Web3Wrapper } from '@0xproject/web3-wrapper';
import BigNumber from 'bignumber.js'; import { BigNumber } from '@0xproject/utils';
import * as _ from 'lodash'; import * as _ from 'lodash';
import { artifacts } from '../artifacts'; import { artifacts } from '../artifacts';

View File

@ -1,6 +1,6 @@
import { schemas } from '@0xproject/json-schemas'; import { schemas } from '@0xproject/json-schemas';
import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Web3Wrapper } from '@0xproject/web3-wrapper';
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';

View File

@ -1,6 +1,6 @@
import { schemas } from '@0xproject/json-schemas'; import { schemas } from '@0xproject/json-schemas';
import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Web3Wrapper } from '@0xproject/web3-wrapper';
import BigNumber from 'bignumber.js'; import { BigNumber } from '@0xproject/utils';
import * as _ from 'lodash'; import * as _ from 'lodash';
import { artifacts } from '../artifacts'; import { artifacts } from '../artifacts';

View File

@ -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

View File

@ -1,5 +1,5 @@
import { intervalUtils } from '@0xproject/utils'; import { intervalUtils } from '@0xproject/utils';
import { BigNumber } from 'bignumber.js'; import { BigNumber } from '@0xproject/utils';
import { RBTree } from 'bintrees'; import { RBTree } from 'bintrees';
import * as _ from 'lodash'; import * as _ from 'lodash';

View File

@ -1,4 +1,4 @@
import { BigNumber } from 'bignumber.js'; import { BigNumber } from '@0xproject/utils';
import { SignedOrder } from '../types'; import { SignedOrder } from '../types';

View File

@ -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';

View File

@ -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';

View File

@ -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 {

View File

@ -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';

View File

@ -4,7 +4,7 @@ import { assert as sharedAssert } from '@0xproject/assert';
import { Schema } from '@0xproject/json-schemas'; import { Schema } from '@0xproject/json-schemas';
import { Web3Wrapper } from '@0xproject/web3-wrapper'; 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 * as _ from 'lodash'; import * as _ from 'lodash';
import { ECSignature } from '../types'; import { ECSignature } from '../types';

View File

@ -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',

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -1,6 +1,6 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils'; import { BlockchainLifecycle } from '@0xproject/dev-utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Web3Wrapper } from '@0xproject/web3-wrapper';
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';

View File

@ -1,5 +1,5 @@
import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Web3Wrapper } from '@0xproject/web3-wrapper';
import BigNumber from 'bignumber.js'; import { BigNumber } from '@0xproject/utils';
import { SignedOrder, Token, ZeroEx } from '../../src'; import { SignedOrder, Token, ZeroEx } from '../../src';
import { artifacts } from '../../src/artifacts'; import { artifacts } from '../../src/artifacts';

View File

@ -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';

View File

@ -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",

View File

@ -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"
} }

View File

@ -1,6 +1,6 @@
import { Schema, SchemaValidator } from '@0xproject/json-schemas'; import { Schema, SchemaValidator } from '@0xproject/json-schemas';
import { addressUtils } from '@0xproject/utils'; import { addressUtils } from '@0xproject/utils';
import BigNumber from 'bignumber.js'; import { BigNumber } from '@0xproject/utils';
import * as _ from 'lodash'; import * as _ from 'lodash';
import * as validUrl from 'valid-url'; import * as validUrl from 'valid-url';

View File

@ -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';

View File

@ -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",

View File

@ -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 {

View File

@ -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 {

View File

@ -1,4 +1,4 @@
import { BigNumber } from 'bignumber.js'; import { BigNumber } from '@0xproject/utils';
import * as _ from 'lodash'; import * as _ from 'lodash';
// TODO: convert all of these to non-mutating, pure functions // TODO: convert all of these to non-mutating, pure functions

View File

@ -1,4 +1,4 @@
import { BigNumber } from 'bignumber.js'; import { BigNumber } from '@0xproject/utils';
import { FeesResponse } from '../../../src/types'; import { FeesResponse } from '../../../src/types';

View File

@ -1,4 +1,4 @@
import { BigNumber } from 'bignumber.js'; import { BigNumber } from '@0xproject/utils';
export const orderResponse = { export const orderResponse = {
maker: '0x9e56625509c2f60af937f23b7b532600390e8c8b', maker: '0x9e56625509c2f60af937f23b7b532600390e8c8b',

View File

@ -1,4 +1,4 @@
import { BigNumber } from 'bignumber.js'; import { BigNumber } from '@0xproject/utils';
export const orderbookResponse = { export const orderbookResponse = {
bids: [ bids: [

View File

@ -1,4 +1,4 @@
import { BigNumber } from 'bignumber.js'; import { BigNumber } from '@0xproject/utils';
export const ordersResponse = [ export const ordersResponse = [
{ {

View File

@ -1,4 +1,4 @@
import { BigNumber } from 'bignumber.js'; import { BigNumber } from '@0xproject/utils';
import { TokenPairsItem } from '../../../src/types'; import { TokenPairsItem } from '../../../src/types';

View File

@ -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';

View File

@ -1,5 +1,5 @@
import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { BigNumber } from 'bignumber.js'; import { BigNumber } from '@0xproject/utils';
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';

View File

@ -1,5 +1,5 @@
import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { BigNumber } from 'bignumber.js'; import { BigNumber } from '@0xproject/utils';
import * as _ from 'lodash'; import * as _ from 'lodash';
import { Deployer } from './../src/deployer'; import { Deployer } from './../src/deployer';

View File

@ -1,4 +1,4 @@
import { BigNumber } from 'bignumber.js'; import { BigNumber } from '@0xproject/utils';
export const constants = { export const constants = {
networkId: 0, networkId: 0,

View File

@ -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

View File

@ -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",

View File

@ -1,6 +1,6 @@
import { ZeroEx, ZeroExError } from '0x.js'; import { ZeroEx, ZeroExError } from '0x.js';
import { promisify } from '@0xproject/utils'; import { promisify } from '@0xproject/utils';
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');

View File

@ -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';

View File

@ -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');

View File

@ -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';

View File

@ -1,6 +1,6 @@
import { RPC } from '@0xproject/dev-utils'; import { RPC } from '@0xproject/dev-utils';
import { promisify } from '@0xproject/utils'; import { promisify } from '@0xproject/utils';
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');

View File

@ -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';

View File

@ -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';

View File

@ -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');

View File

@ -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[];

View File

@ -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';

View File

@ -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';

View File

@ -1,5 +1,5 @@
import { promisify } from '@0xproject/utils'; import { promisify } from '@0xproject/utils';
import { BigNumber } from 'bignumber.js'; import { BigNumber } from '@0xproject/utils';
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');

View File

@ -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';

View File

@ -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 {

View File

@ -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"

View File

@ -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",

View File

@ -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');

View File

@ -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",

View File

@ -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';

View File

@ -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"
} }
} }

View File

@ -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 {

View File

@ -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,
});
},
};

View 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 };

View File

@ -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';

View File

@ -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"
} }

View File

@ -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>;

View File

@ -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",

View File

@ -22,7 +22,7 @@ import {
RedundantRPCSubprovider, RedundantRPCSubprovider,
} from '@0xproject/subproviders'; } from '@0xproject/subproviders';
import { intervalUtils, promisify } from '@0xproject/utils'; import { intervalUtils, promisify } from '@0xproject/utils';
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 contract = require('truffle-contract'); import contract = require('truffle-contract');

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -1,6 +1,6 @@
import { Order as ZeroExOrder, ZeroEx } from '0x.js'; import { Order as ZeroExOrder, ZeroEx } from '0x.js';
import * as accounting from 'accounting'; import * as accounting from 'accounting';
import BigNumber from 'bignumber.js'; import { BigNumber } from '@0xproject/utils';
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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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