diff options
author | Fabio Berger <me@fabioberger.com> | 2018-04-02 03:28:29 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-04-02 03:28:29 +0800 |
commit | c6f85464ced3cecb2a4a5b3b79a19b6fd56c8a58 (patch) | |
tree | c5dbda13f35991df12dbc3bc36d9a985f3b6777e /packages/0x.js | |
parent | 0e33f45f3dbf7934692e3baa3daa90ddab0c184f (diff) | |
parent | a220b56736bcacfcce045329c99091af5932e723 (diff) | |
download | dexon-sol-tools-c6f85464ced3cecb2a4a5b3b79a19b6fd56c8a58.tar dexon-sol-tools-c6f85464ced3cecb2a4a5b3b79a19b6fd56c8a58.tar.gz dexon-sol-tools-c6f85464ced3cecb2a4a5b3b79a19b6fd56c8a58.tar.bz2 dexon-sol-tools-c6f85464ced3cecb2a4a5b3b79a19b6fd56c8a58.tar.lz dexon-sol-tools-c6f85464ced3cecb2a4a5b3b79a19b6fd56c8a58.tar.xz dexon-sol-tools-c6f85464ced3cecb2a4a5b3b79a19b6fd56c8a58.tar.zst dexon-sol-tools-c6f85464ced3cecb2a4a5b3b79a19b6fd56c8a58.zip |
Merge branch 'development' into refactor/publishProcess
* development:
Run prettier, update deployer CHANGELOG
Create solc_bin dir if does not exist before attempting to compile
Add missing type import
Diffstat (limited to 'packages/0x.js')
-rw-r--r-- | packages/0x.js/src/0x.ts | 10 | ||||
-rw-r--r-- | packages/0x.js/src/order_watcher/event_watcher.ts | 6 | ||||
-rw-r--r-- | packages/0x.js/src/order_watcher/order_state_watcher.ts | 10 | ||||
-rw-r--r-- | packages/0x.js/test/order_state_watcher_test.ts | 4 |
4 files changed, 11 insertions, 19 deletions
diff --git a/packages/0x.js/src/0x.ts b/packages/0x.js/src/0x.ts index 7627f1d6e..b82cc820f 100644 --- a/packages/0x.js/src/0x.ts +++ b/packages/0x.js/src/0x.ts @@ -15,7 +15,7 @@ import { OrderStateWatcher } from './order_watcher/order_state_watcher'; import { zeroExConfigSchema } from './schemas/zero_ex_config_schema'; import { zeroExPrivateNetworkConfigSchema } from './schemas/zero_ex_private_network_config_schema'; import { zeroExPublicNetworkConfigSchema } from './schemas/zero_ex_public_network_config_schema'; -import { OrderStateWatcherConfig, ZeroExConfig, ZeroExError } from './types'; +import { OrderStateWatcherConfig, Web3Provider, ZeroExConfig, ZeroExError } from './types'; import { assert } from './utils/assert'; import { constants } from './utils/constants'; import { decorators } from './utils/decorators'; @@ -331,13 +331,7 @@ export class ZeroEx { * @return An instance of the 0x.js OrderStateWatcher class. */ public createOrderStateWatcher(config?: OrderStateWatcherConfig) { - return new OrderStateWatcher( - this._web3Wrapper, - this._abiDecoder, - this.token, - this.exchange, - config, - ); + return new OrderStateWatcher(this._web3Wrapper, this._abiDecoder, this.token, this.exchange, config); } /* * HACK: `TokenWrapper` needs a token transfer proxy address. `TokenTransferProxy` address is fetched from diff --git a/packages/0x.js/src/order_watcher/event_watcher.ts b/packages/0x.js/src/order_watcher/event_watcher.ts index d01542a8c..47bbd5b2e 100644 --- a/packages/0x.js/src/order_watcher/event_watcher.ts +++ b/packages/0x.js/src/order_watcher/event_watcher.ts @@ -23,7 +23,11 @@ export class EventWatcher { private _intervalIdIfExists?: NodeJS.Timer; private _lastEvents: LogEntry[] = []; private _stateLayer: BlockParamLiteral; - constructor(web3Wrapper: Web3Wrapper, pollingIntervalIfExistsMs: undefined | number, stateLayer: BlockParamLiteral = BlockParamLiteral.Latest) { + constructor( + web3Wrapper: Web3Wrapper, + pollingIntervalIfExistsMs: undefined | number, + stateLayer: BlockParamLiteral = BlockParamLiteral.Latest, + ) { this._web3Wrapper = web3Wrapper; this._stateLayer = stateLayer; this._pollingIntervalMs = _.isUndefined(pollingIntervalIfExistsMs) diff --git a/packages/0x.js/src/order_watcher/order_state_watcher.ts b/packages/0x.js/src/order_watcher/order_state_watcher.ts index bfd250e21..cd6016c5a 100644 --- a/packages/0x.js/src/order_watcher/order_state_watcher.ts +++ b/packages/0x.js/src/order_watcher/order_state_watcher.ts @@ -86,14 +86,10 @@ export class OrderStateWatcher { this._abiDecoder = abiDecoder; this._web3Wrapper = web3Wrapper; const pollingIntervalIfExistsMs = _.isUndefined(config) ? undefined : config.eventPollingIntervalMs; - const stateLayer = _.isUndefined(config) || _.isUndefined(config.stateLayer) - ? BlockParamLiteral.Latest - : config.stateLayer; + const stateLayer = + _.isUndefined(config) || _.isUndefined(config.stateLayer) ? BlockParamLiteral.Latest : config.stateLayer; this._eventWatcher = new EventWatcher(web3Wrapper, pollingIntervalIfExistsMs, stateLayer); - this._balanceAndProxyAllowanceLazyStore = new BalanceAndProxyAllowanceLazyStore( - token, - stateLayer, - ); + this._balanceAndProxyAllowanceLazyStore = new BalanceAndProxyAllowanceLazyStore(token, stateLayer); this._orderFilledCancelledLazyStore = new OrderFilledCancelledLazyStore(exchange); this._orderStateUtils = new OrderStateUtils( this._balanceAndProxyAllowanceLazyStore, diff --git a/packages/0x.js/test/order_state_watcher_test.ts b/packages/0x.js/test/order_state_watcher_test.ts index 4f727d495..4210e013f 100644 --- a/packages/0x.js/test/order_state_watcher_test.ts +++ b/packages/0x.js/test/order_state_watcher_test.ts @@ -15,9 +15,7 @@ import { ZeroEx, ZeroExError, } from '../src'; -import { - OrderStateWatcher, -} from '../src/order_watcher/order_state_watcher'; +import { OrderStateWatcher } from '../src/order_watcher/order_state_watcher'; import { DoneCallback } from '../src/types'; import { chaiSetup } from './utils/chai_setup'; |