Use configured version of bignumber in all packages
This commit is contained in:
parent
ce6abad97f
commit
4dfa720f2d
@ -3,9 +3,8 @@
|
||||
* Templates can be found at https://github.com/0xProject/0x.js/tree/development/packages/abi-gen-templates.
|
||||
*/
|
||||
// tslint:disable-next-line:no-unused-variable
|
||||
import {TxData, TxDataPayable} from '@0xproject/types';
|
||||
import {classUtils, promisify} from '@0xproject/utils';
|
||||
import {BigNumber} from 'bignumber.js';
|
||||
import { TxData, TxDataPayable } from '@0xproject/types';
|
||||
import { BigNumber, classUtils, promisify } from '@0xproject/utils';
|
||||
import * as Web3 from 'web3';
|
||||
|
||||
import {BaseContract} from './base_contract';
|
||||
|
@ -88,7 +88,6 @@
|
||||
"@0xproject/json-schemas": "^0.7.1",
|
||||
"@0xproject/utils": "^0.1.2",
|
||||
"@0xproject/web3-wrapper": "^0.1.2",
|
||||
"bignumber.js": "~4.1.0",
|
||||
"bintrees": "^1.0.2",
|
||||
"bn.js": "^4.11.8",
|
||||
"compare-versions": "^3.0.1",
|
||||
|
@ -1,7 +1,6 @@
|
||||
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 BigNumber from 'bignumber.js';
|
||||
import * as ethUtil from 'ethereumjs-util';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
@ -29,9 +28,6 @@ import { decorators } from './utils/decorators';
|
||||
import { signatureUtils } from './utils/signature_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
|
||||
* and all calls to the library should be made through a ZeroEx instance.
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { schemas } from '@0xproject/json-schemas';
|
||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts } from '../artifacts';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { schemas } from '@0xproject/json-schemas';
|
||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import * as Web3 from 'web3';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { schemas } from '@0xproject/json-schemas';
|
||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
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.
|
||||
// Source: https://github.com/Microsoft/TypeScript/issues/7352#issuecomment-191547232
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { intervalUtils } from '@0xproject/utils';
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import { RBTree } from 'bintrees';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
|
||||
import { SignedOrder } from '../types';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
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 { ExchangeWrapper } from '../contract_wrappers/exchange_wrapper';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { TransactionReceipt } from '@0xproject/types';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as Web3 from 'web3';
|
||||
|
||||
export enum ZeroExError {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import * as Web3 from 'web3';
|
||||
import * as SolidityCoder from 'web3/lib/solidity/coder';
|
||||
|
@ -4,7 +4,7 @@ import { assert as sharedAssert } from '@0xproject/assert';
|
||||
import { Schema } from '@0xproject/json-schemas';
|
||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
// tslint:disable-next-line:no-unused-variable
|
||||
import * as BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { ECSignature } from '../types';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
|
||||
export const constants = {
|
||||
NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
|
||||
|
@ -1,4 +1,4 @@
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
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 { ZeroEx } from '../0x';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { ZeroEx } from '../0x';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import BN = require('bn.js');
|
||||
import * as ethABI from 'ethereumjs-abi';
|
||||
import * as ethUtil from 'ethereumjs-util';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { BlockchainLifecycle } from '@0xproject/dev-utils';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as chai from 'chai';
|
||||
import * as _ from 'lodash';
|
||||
import 'mocha';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { BlockchainLifecycle } from '@0xproject/dev-utils';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as chai from 'chai';
|
||||
import 'mocha';
|
||||
import * as Web3 from 'web3';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { BlockchainLifecycle } from '@0xproject/dev-utils';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as chai from 'chai';
|
||||
|
||||
import { ExchangeContractErrs, Token, ZeroEx } from '../src';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { BlockchainLifecycle } from '@0xproject/dev-utils';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as chai from 'chai';
|
||||
import 'mocha';
|
||||
import * as Web3 from 'web3';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { BlockchainLifecycle } from '@0xproject/dev-utils';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as chai from 'chai';
|
||||
import * as _ from 'lodash';
|
||||
import 'mocha';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { BlockchainLifecycle } from '@0xproject/dev-utils';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as chai from 'chai';
|
||||
import * as _ from 'lodash';
|
||||
import 'mocha';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { BlockchainLifecycle } from '@0xproject/dev-utils';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as chai from 'chai';
|
||||
import * as Sinon from 'sinon';
|
||||
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 'mocha';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { BlockchainLifecycle } from '@0xproject/dev-utils';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as chai from 'chai';
|
||||
import * as _ from 'lodash';
|
||||
import 'mocha';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { BlockchainLifecycle } from '@0xproject/dev-utils';
|
||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as chai from 'chai';
|
||||
import 'mocha';
|
||||
import * as Web3 from 'web3';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
|
||||
import { SignedOrder, Token, ZeroEx } from '../../src';
|
||||
import { artifacts } from '../../src/artifacts';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { SignedOrder, ZeroEx } from '../../src';
|
||||
|
@ -22,7 +22,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x.js/packages/abi-gen/README.md",
|
||||
"dependencies": {
|
||||
"bignumber.js": "~4.1.0",
|
||||
"@0xproject/utils": "^0.1.2",
|
||||
"chalk": "^2.3.0",
|
||||
"glob": "^7.1.2",
|
||||
"handlebars": "^4.0.11",
|
||||
|
@ -39,7 +39,6 @@
|
||||
"dependencies": {
|
||||
"@0xproject/json-schemas": "^0.7.1",
|
||||
"@0xproject/utils": "^0.1.2",
|
||||
"bignumber.js": "~4.1.0",
|
||||
"lodash": "^4.17.4",
|
||||
"valid-url": "^1.0.9"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Schema, SchemaValidator } from '@0xproject/json-schemas';
|
||||
import { addressUtils } from '@0xproject/utils';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import * as validUrl from 'valid-url';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { schemas } from '@0xproject/json-schemas';
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as chai from 'chai';
|
||||
import * as dirtyChai from 'dirty-chai';
|
||||
import 'mocha';
|
||||
|
@ -39,7 +39,6 @@
|
||||
"@0xproject/assert": "^0.0.9",
|
||||
"@0xproject/json-schemas": "^0.7.1",
|
||||
"@0xproject/utils": "^0.1.2",
|
||||
"bignumber.js": "~4.1.0",
|
||||
"isomorphic-fetch": "^2.2.1",
|
||||
"lodash": "^4.17.4",
|
||||
"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 { WebSocketOrderbookChannel } from './ws_orderbook_channel';
|
||||
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
|
||||
export interface Order {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
// TODO: convert all of these to non-mutating, pure functions
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
|
||||
import { FeesResponse } from '../../../src/types';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
|
||||
export const orderResponse = {
|
||||
maker: '0x9e56625509c2f60af937f23b7b532600390e8c8b',
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
|
||||
export const orderbookResponse = {
|
||||
bids: [
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
|
||||
export const ordersResponse = [
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
|
||||
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 chaiAsPromised from 'chai-as-promised';
|
||||
import * as dirtyChai from 'dirty-chai';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import * as path from 'path';
|
||||
import * as Web3 from 'web3';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { Deployer } from './../src/deployer';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
|
||||
export const constants = {
|
||||
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.
|
||||
// Source: https://github.com/Microsoft/TypeScript/issues/7352#issuecomment-191547232
|
||||
|
@ -59,7 +59,6 @@
|
||||
"@0xproject/json-schemas": "^0.7.1",
|
||||
"@0xproject/utils": "^0.1.2",
|
||||
"@0xproject/web3-wrapper": "^0.1.2",
|
||||
"bignumber.js": "~4.1.0",
|
||||
"bluebird": "^3.5.0",
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereumjs-abi": "^0.6.4",
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { ZeroEx, ZeroExError } from '0x.js';
|
||||
import { promisify } from '@0xproject/utils';
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as chai from 'chai';
|
||||
import Web3 = require('web3');
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ZeroEx } from '0x.js';
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as chai from 'chai';
|
||||
import ethUtil = require('ethereumjs-util');
|
||||
import * as Web3 from 'web3';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ZeroEx } from '0x.js';
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as chai from 'chai';
|
||||
import ethUtil = require('ethereumjs-util');
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ZeroEx } from '0x.js';
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as chai from 'chai';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { RPC } from '@0xproject/dev-utils';
|
||||
import { promisify } from '@0xproject/utils';
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as chai from 'chai';
|
||||
import Web3 = require('web3');
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ZeroEx } from '0x.js';
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as chai from 'chai';
|
||||
import * as Web3 from 'web3';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ZeroEx } from '0x.js';
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as chai from 'chai';
|
||||
import * as Web3 from 'web3';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ZeroEx } from '0x.js';
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as chai from 'chai';
|
||||
import Web3 = require('web3');
|
||||
|
||||
|
@ -1,11 +1,8 @@
|
||||
import { bigNumberConfigs } from '@0xproject/utils';
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { BalancesByOwner, ContractInstance } from './types';
|
||||
|
||||
bigNumberConfigs.configure();
|
||||
|
||||
export class Balances {
|
||||
private _tokenContractInstances: ContractInstance[];
|
||||
private _ownerAddresses: string[];
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { formatters } from './formatters';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { Order } from './order';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { promisify } from '@0xproject/utils';
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import ethUtil = require('ethereumjs-util');
|
||||
import * as _ from 'lodash';
|
||||
import Web3 = require('web3');
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ZeroEx } from '0x.js';
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { Order } from './order';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as Web3 from 'web3';
|
||||
|
||||
export interface BalancesByOwner {
|
||||
|
@ -29,7 +29,7 @@
|
||||
"typescript": "~2.6.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"bignumber.js": "~4.1.0",
|
||||
"@0xproject/utils": "^0.1.2",
|
||||
"ethereumjs-util": "^5.1.2",
|
||||
"lodash": "^4.17.4",
|
||||
"request-promise-native": "^1.0.5"
|
||||
|
@ -32,7 +32,6 @@
|
||||
"@types/lodash.foreach": "^4.5.3",
|
||||
"@types/lodash.values": "^4.3.3",
|
||||
"@types/mocha": "^2.2.42",
|
||||
"bignumber.js": "~4.1.0",
|
||||
"chai": "^4.0.1",
|
||||
"chai-typescript-typings": "^0.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 dirtyChai from 'dirty-chai';
|
||||
import forEach = require('lodash.foreach');
|
||||
|
@ -16,7 +16,6 @@
|
||||
"dependencies": {
|
||||
"0x.js": "^0.29.0",
|
||||
"@0xproject/utils": "^0.1.2",
|
||||
"bignumber.js": "~4.1.0",
|
||||
"body-parser": "^1.17.1",
|
||||
"ethereumjs-tx": "^1.3.3",
|
||||
"express": "^4.15.2",
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ZeroEx } from '0x.js';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { configs } from './configs';
|
||||
|
@ -20,13 +20,12 @@
|
||||
"homepage": "https://github.com/0xProject/0x.js/packages/types/README.md",
|
||||
"devDependencies": {
|
||||
"@0xproject/tslint-config": "^0.4.0",
|
||||
"bignumber.js": "^5.0.0",
|
||||
"shx": "^0.2.2",
|
||||
"tslint": "5.8.0",
|
||||
"typescript": "~2.6.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"bignumber.js": "~4.1.0",
|
||||
"@0xproject/utils": "^0.1.2",
|
||||
"web3": "^0.20.0"
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { BigNumber } from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as Web3 from 'web3';
|
||||
|
||||
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 { classUtils } from './class_utils';
|
||||
export { intervalUtils } from './interval_utils';
|
||||
export { bigNumberConfigs } from './bignumber_config';
|
||||
export { BigNumber } from './configured_bignumber';
|
||||
|
@ -30,7 +30,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/utils": "^0.1.2",
|
||||
"bignumber.js": "~4.1.0",
|
||||
"lodash": "^4.17.4",
|
||||
"web3": "^0.20.0"
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { TransactionReceipt, TxData } from '@0xproject/types';
|
||||
import { bigNumberConfigs, promisify } from '@0xproject/utils';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber, promisify } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import * as Web3 from 'web3';
|
||||
|
||||
@ -15,9 +14,6 @@ interface RawLogEntry {
|
||||
topics: string[];
|
||||
}
|
||||
|
||||
// Customize our BigNumber instances
|
||||
bigNumberConfigs.configure();
|
||||
|
||||
export class Web3Wrapper {
|
||||
private _web3: Web3;
|
||||
private _defaults: Partial<TxData>;
|
||||
|
@ -23,7 +23,6 @@
|
||||
"@0xproject/utils": "^0.1.2",
|
||||
"accounting": "^0.4.1",
|
||||
"basscss": "^8.0.3",
|
||||
"bignumber.js": "~4.1.0",
|
||||
"blockies": "^0.0.2",
|
||||
"compare-versions": "^3.0.1",
|
||||
"dateformat": "^2.0.0",
|
||||
|
@ -22,7 +22,7 @@ import {
|
||||
RedundantRPCSubprovider,
|
||||
} from '@0xproject/subproviders';
|
||||
import { intervalUtils, promisify } from '@0xproject/utils';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
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 FlatButton from 'material-ui/FlatButton';
|
||||
import * as React from 'react';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
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 Dialog from 'material-ui/Dialog';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ZeroEx } from '0x.js';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import RaisedButton from 'material-ui/RaisedButton';
|
||||
import * as React from 'react';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ZeroEx } from '0x.js';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import Divider from 'material-ui/Divider';
|
||||
import { Table, TableBody, TableHeader, TableHeaderColumn, TableRow, TableRowColumn } from 'material-ui/Table';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Order as ZeroExOrder, ZeroEx } from '0x.js';
|
||||
import * as accounting from 'accounting';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import { Card, CardHeader, CardText } from 'material-ui/Card';
|
||||
import Divider from 'material-ui/Divider';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ZeroEx } from '0x.js';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import Paper from 'material-ui/Paper';
|
||||
import TextField from 'material-ui/TextField';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ZeroEx } from '0x.js';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { Token } from 'ts/types';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Order, ZeroEx } from '0x.js';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
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 TextField from 'material-ui/TextField';
|
||||
import * as React from 'react';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import Toggle from 'material-ui/Toggle';
|
||||
import * as React from 'react';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import TextField from 'material-ui/TextField';
|
||||
import * as React from 'react';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ZeroEx } from '0x.js';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
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 DatePicker from 'material-ui/DatePicker';
|
||||
import TimePicker from 'material-ui/TimePicker';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ZeroEx } from '0x.js';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
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 Paper from 'material-ui/Paper';
|
||||
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 Paper from 'material-ui/Paper';
|
||||
import * as React from 'react';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import RaisedButton from 'material-ui/RaisedButton';
|
||||
import * as React from 'react';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ZeroEx } from '0x.js';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import DharmaLoanFrame from 'dharma-loan-frame';
|
||||
import * as _ from 'lodash';
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ZeroEx } from '0x.js';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import Paper from 'material-ui/Paper';
|
||||
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 React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user