Merge pull request #289 from 0xProject/fix/missingBigNumberConfigs

Add missing calls to bigNumberConfigs in packages where we are instan…
This commit is contained in:
Brandon Millman
2017-12-21 21:04:50 -05:00
committed by GitHub
4 changed files with 13 additions and 7 deletions

View File

@@ -38,6 +38,7 @@
"dependencies": {
"@0xproject/assert": "^0.0.8",
"@0xproject/json-schemas": "^0.7.0",
"@0xproject/utils": "^0.1.1",
"bignumber.js": "~4.1.0",
"isomorphic-fetch": "^2.2.1",
"lodash": "^4.17.4",

View File

@@ -1,6 +1,5 @@
import {assert} from '@0xproject/assert';
import {schemas} from '@0xproject/json-schemas';
import {BigNumber} from 'bignumber.js';
import 'isomorphic-fetch';
import * as _ from 'lodash';
import * as queryString from 'query-string';
@@ -21,11 +20,6 @@ import {
} from './types';
import {typeConverters} from './utils/type_converters';
// TODO: move this and bigNumberConfigs in the 0x.js package into one place
BigNumber.config({
EXPONENTIAL_AT: 1000,
});
/**
* This class includes all the functionality related to interacting with a set of HTTP endpoints
* that implement the standard relayer API v0

View File

@@ -1,3 +1,8 @@
import {bigNumberConfigs} from '@0xproject/utils';
// Customize our BigNumber instances
bigNumberConfigs.configure();
export {HttpClient} from './http_client';
export {WebSocketOrderbookChannel} from './ws_orderbook_channel';
export {

View File

@@ -1,5 +1,8 @@
import {TransactionReceipt, TxData} from '@0xproject/types';
import {promisify} from '@0xproject/utils';
import {
bigNumberConfigs,
promisify,
} from '@0xproject/utils';
import BigNumber from 'bignumber.js';
import * as _ from 'lodash';
import * as Web3 from 'web3';
@@ -15,6 +18,9 @@ interface RawLogEntry {
topics: string[];
}
// Customize our BigNumber instances
bigNumberConfigs.configure();
export class Web3Wrapper {
private _web3: Web3;
private _defaults: Partial<TxData>;