aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-watcher
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-06-07 18:21:44 +0800
committerFabio Berger <me@fabioberger.com>2018-06-07 18:21:44 +0800
commit10478a6b2fd1f2a01597a88afde9cf582640a849 (patch)
tree3ebbb29656cf59b2547ec3c5a3c5b90ee6264483 /packages/order-watcher
parentcf8fdd3a701f21bfc3b2ec8397fa65948f5cdc78 (diff)
parente0bc01eea1c20e0afda296f331c6a475e062b59c (diff)
downloaddexon-0x-contracts-10478a6b2fd1f2a01597a88afde9cf582640a849.tar.gz
dexon-0x-contracts-10478a6b2fd1f2a01597a88afde9cf582640a849.tar.zst
dexon-0x-contracts-10478a6b2fd1f2a01597a88afde9cf582640a849.zip
Merge branch 'v2-prototype' into refactor/move-spawn-switch-to-utils
* v2-prototype: (66 commits) Run prettier Remove unused variable Fix linting issues Change shouldRenderHeader prop to shouldHideHeader Get build and tests to pass typo Apply prettier Update contracts tests after rebase Apply various fixes based on PR feedback Document debug_increaseTime method and fix typo in devnet README Use an enum for ProviderType in contracts/src/utils/web3_wrapper Update contracts package README Update relevant changelogs Remove global gas estimate buffer Add Async suffix to relevant assertions Fix linter errors Update package.json and yarn.lock Update more things to work with both Geth and Ganache Small fixes and cleanup Add additional gas to calls to fillOrderNoThrow ... # Conflicts: # packages/order-watcher/src/order_watcher/order_watcher.ts # packages/react-docs/src/components/type.tsx # packages/website/ts/components/ui/lifecycle_raised_button.tsx # packages/website/ts/components/wallet/wallet.tsx
Diffstat (limited to 'packages/order-watcher')
-rw-r--r--packages/order-watcher/package.json5
-rw-r--r--packages/order-watcher/src/order_watcher/order_watcher.ts2
-rw-r--r--packages/order-watcher/src/types.ts16
-rw-r--r--packages/order-watcher/src/utils/assert.ts6
-rw-r--r--packages/order-watcher/test/event_watcher_test.ts2
-rw-r--r--packages/order-watcher/test/expiration_watcher_test.ts3
-rw-r--r--packages/order-watcher/test/global_hooks.ts2
-rw-r--r--packages/order-watcher/test/order_watcher_test.ts4
-rw-r--r--packages/order-watcher/test/utils/web3_wrapper.ts2
9 files changed, 12 insertions, 30 deletions
diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json
index 0beb4a6a7..b67df2e4c 100644
--- a/packages/order-watcher/package.json
+++ b/packages/order-watcher/package.json
@@ -15,8 +15,8 @@
"watch_without_deps": "yarn pre_build && tsc -w",
"build": "yarn pre_build && tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"pre_build": "run-s update_test_artifacts update_compact_artifacts generate_contract_wrappers",
- "generate_contract_wrappers": "abi-gen --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers && prettier --write 'src/generated_contract_wrappers/**.ts'",
- "lint": "tslint --project .",
+ "lint": "tslint --project . --exclude **/src/generated_contract_wrappers/**/*",
+ "generate_contract_wrappers": "abi-gen --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers",
"test:circleci": "run-s test:coverage",
"test": "yarn run_mocha",
"rebuild_and_test": "run-s build test",
@@ -70,7 +70,6 @@
"npm-run-all": "^4.1.2",
"nyc": "^11.0.1",
"opn-cli": "^3.1.0",
- "prettier": "^1.11.1",
"shx": "^0.2.2",
"sinon": "^4.0.0",
"source-map-support": "^0.5.0",
diff --git a/packages/order-watcher/src/order_watcher/order_watcher.ts b/packages/order-watcher/src/order_watcher/order_watcher.ts
index 498ec5357..f25076213 100644
--- a/packages/order-watcher/src/order_watcher/order_watcher.ts
+++ b/packages/order-watcher/src/order_watcher/order_watcher.ts
@@ -14,7 +14,7 @@ import {
Provider,
SignedOrder,
} from '@0xproject/types';
-import { AbiDecoder, errorUtils, intervalUtils } from '@0xproject/utils';
+import { errorUtils, intervalUtils } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
diff --git a/packages/order-watcher/src/types.ts b/packages/order-watcher/src/types.ts
index 9125af236..f5b189c5a 100644
--- a/packages/order-watcher/src/types.ts
+++ b/packages/order-watcher/src/types.ts
@@ -1,18 +1,4 @@
-import { BigNumber } from '@0xproject/utils';
-
-import {
- BlockParam,
- BlockParamLiteral,
- ContractAbi,
- ContractEventArg,
- ExchangeContractErrs,
- FilterObject,
- LogEntryEvent,
- LogWithDecodedArgs,
- Order,
- OrderState,
- SignedOrder,
-} from '@0xproject/types';
+import { BlockParamLiteral, LogEntryEvent, OrderState } from '@0xproject/types';
export enum OrderWatcherError {
SubscriptionAlreadyPresent = 'SUBSCRIPTION_ALREADY_PRESENT',
diff --git a/packages/order-watcher/src/utils/assert.ts b/packages/order-watcher/src/utils/assert.ts
index 9e02f8bdc..5d7f72716 100644
--- a/packages/order-watcher/src/utils/assert.ts
+++ b/packages/order-watcher/src/utils/assert.ts
@@ -1,12 +1,10 @@
import { assert as sharedAssert } from '@0xproject/assert';
// 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:no-unused-variable
import { Schema } from '@0xproject/json-schemas';
-// tslint:disable-next-line:no-unused-variable
import { ECSignature } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
-import { Web3Wrapper } from '@0xproject/web3-wrapper';
-import * as _ from 'lodash';
+// tslint:enable:no-unused-variable
import { isValidSignature } from '@0xproject/order-utils';
diff --git a/packages/order-watcher/test/event_watcher_test.ts b/packages/order-watcher/test/event_watcher_test.ts
index ba77d50dd..8a43ef8f9 100644
--- a/packages/order-watcher/test/event_watcher_test.ts
+++ b/packages/order-watcher/test/event_watcher_test.ts
@@ -1,4 +1,4 @@
-import { callbackErrorReporter, web3Factory } from '@0xproject/dev-utils';
+import { callbackErrorReporter } from '@0xproject/dev-utils';
import { DoneCallback, LogEntry, LogEntryEvent } from '@0xproject/types';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as chai from 'chai';
diff --git a/packages/order-watcher/test/expiration_watcher_test.ts b/packages/order-watcher/test/expiration_watcher_test.ts
index ef15bf006..068c267c3 100644
--- a/packages/order-watcher/test/expiration_watcher_test.ts
+++ b/packages/order-watcher/test/expiration_watcher_test.ts
@@ -1,5 +1,5 @@
import { ContractWrappers } from '@0xproject/contract-wrappers';
-import { BlockchainLifecycle, callbackErrorReporter, devConstants } from '@0xproject/dev-utils';
+import { BlockchainLifecycle, callbackErrorReporter } from '@0xproject/dev-utils';
import { FillScenarios } from '@0xproject/fill-scenarios';
import { getOrderHashHex } from '@0xproject/order-utils';
import { DoneCallback, Token } from '@0xproject/types';
@@ -10,7 +10,6 @@ import 'make-promises-safe';
import 'mocha';
import * as Sinon from 'sinon';
-import { artifacts } from '../src/artifacts';
import { ExpirationWatcher } from '../src/order_watcher/expiration_watcher';
import { utils } from '../src/utils/utils';
diff --git a/packages/order-watcher/test/global_hooks.ts b/packages/order-watcher/test/global_hooks.ts
index 3d3f0e474..f18eef379 100644
--- a/packages/order-watcher/test/global_hooks.ts
+++ b/packages/order-watcher/test/global_hooks.ts
@@ -1,9 +1,7 @@
import { devConstants } from '@0xproject/dev-utils';
import { runV1MigrationsAsync } from '@0xproject/migrations';
import 'make-promises-safe';
-import * as path from 'path';
-import { constants } from './utils/constants';
import { provider } from './utils/web3_wrapper';
before('migrate contracts', async function(): Promise<void> {
diff --git a/packages/order-watcher/test/order_watcher_test.ts b/packages/order-watcher/test/order_watcher_test.ts
index 0d33e7ea2..a4713a56c 100644
--- a/packages/order-watcher/test/order_watcher_test.ts
+++ b/packages/order-watcher/test/order_watcher_test.ts
@@ -1,5 +1,6 @@
+// tslint:disable:no-unnecessary-type-assertion
import { ContractWrappers } from '@0xproject/contract-wrappers';
-import { BlockchainLifecycle, callbackErrorReporter, devConstants } from '@0xproject/dev-utils';
+import { BlockchainLifecycle, callbackErrorReporter } from '@0xproject/dev-utils';
import { FillScenarios } from '@0xproject/fill-scenarios';
import { getOrderHashHex } from '@0xproject/order-utils';
import {
@@ -53,6 +54,7 @@ describe('OrderWatcher', () => {
const fillableAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(5), decimals);
before(async () => {
contractWrappers = new ContractWrappers(provider, config);
+ // tslint:disable-next-line:no-unused-variable
const networkId = await web3Wrapper.getNetworkIdAsync();
orderWatcher = new OrderWatcher(provider, constants.TESTRPC_NETWORK_ID);
exchangeContractAddress = contractWrappers.exchange.getContractAddress();
diff --git a/packages/order-watcher/test/utils/web3_wrapper.ts b/packages/order-watcher/test/utils/web3_wrapper.ts
index 71a0dc1c2..f7d11f138 100644
--- a/packages/order-watcher/test/utils/web3_wrapper.ts
+++ b/packages/order-watcher/test/utils/web3_wrapper.ts
@@ -1,4 +1,4 @@
-import { devConstants, web3Factory } from '@0xproject/dev-utils';
+import { web3Factory } from '@0xproject/dev-utils';
import { Provider } from '@0xproject/types';
import { Web3Wrapper } from '@0xproject/web3-wrapper';