aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-01-04 21:53:38 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-01-04 21:53:38 +0800
commitc49f68ef3ebb11f779868b35f938c1d1cb08c665 (patch)
tree956cc24a95bfe53d9f244af1d79e728f44458a58 /packages
parentd0f66f86243ed958908b1c1d02a04e120c37cf71 (diff)
downloaddexon-sol-tools-c49f68ef3ebb11f779868b35f938c1d1cb08c665.tar.gz
dexon-sol-tools-c49f68ef3ebb11f779868b35f938c1d1cb08c665.tar.zst
dexon-sol-tools-c49f68ef3ebb11f779868b35f938c1d1cb08c665.zip
Fix linter errors
Diffstat (limited to 'packages')
-rw-r--r--packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts2
-rw-r--r--packages/0x.js/src/contract_wrappers/exchange_wrapper.ts2
-rw-r--r--packages/0x.js/src/contract_wrappers/token_wrapper.ts2
-rw-r--r--packages/0x.js/src/order_watcher/expiration_watcher.ts3
-rw-r--r--packages/0x.js/src/utils/assert.ts2
-rw-r--r--packages/0x.js/test/token_wrapper_test.ts2
-rw-r--r--packages/0x.js/test/utils/fill_scenarios.ts2
-rw-r--r--packages/abi-gen/src/utils.ts5
8 files changed, 11 insertions, 9 deletions
diff --git a/packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts b/packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts
index 3e17b756e..b03571636 100644
--- a/packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts
+++ b/packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts
@@ -1,6 +1,6 @@
import { schemas } from '@0xproject/json-schemas';
-import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { BigNumber } from '@0xproject/utils';
+import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
import { artifacts } from '../artifacts';
diff --git a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts
index 2f78ca091..e1d80e01a 100644
--- a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts
+++ b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts
@@ -1,6 +1,6 @@
import { schemas } from '@0xproject/json-schemas';
-import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { BigNumber } from '@0xproject/utils';
+import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
import * as Web3 from 'web3';
diff --git a/packages/0x.js/src/contract_wrappers/token_wrapper.ts b/packages/0x.js/src/contract_wrappers/token_wrapper.ts
index ead1c8274..7943f4a60 100644
--- a/packages/0x.js/src/contract_wrappers/token_wrapper.ts
+++ b/packages/0x.js/src/contract_wrappers/token_wrapper.ts
@@ -1,6 +1,6 @@
import { schemas } from '@0xproject/json-schemas';
-import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { BigNumber } from '@0xproject/utils';
+import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
import { artifacts } from '../artifacts';
diff --git a/packages/0x.js/src/order_watcher/expiration_watcher.ts b/packages/0x.js/src/order_watcher/expiration_watcher.ts
index 88c44f9a2..e7d085fc8 100644
--- a/packages/0x.js/src/order_watcher/expiration_watcher.ts
+++ b/packages/0x.js/src/order_watcher/expiration_watcher.ts
@@ -1,5 +1,4 @@
-import { intervalUtils } from '@0xproject/utils';
-import { BigNumber } from '@0xproject/utils';
+import { BigNumber, intervalUtils } from '@0xproject/utils';
import { RBTree } from 'bintrees';
import * as _ from 'lodash';
diff --git a/packages/0x.js/src/utils/assert.ts b/packages/0x.js/src/utils/assert.ts
index cf20e7ed7..c21f2dbca 100644
--- a/packages/0x.js/src/utils/assert.ts
+++ b/packages/0x.js/src/utils/assert.ts
@@ -2,9 +2,9 @@ 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
import { Schema } from '@0xproject/json-schemas';
-import { Web3Wrapper } from '@0xproject/web3-wrapper';
// tslint:disable-next-line:no-unused-variable
import { BigNumber } from '@0xproject/utils';
+import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
import { ECSignature } from '../types';
diff --git a/packages/0x.js/test/token_wrapper_test.ts b/packages/0x.js/test/token_wrapper_test.ts
index b30a906c5..296a704dd 100644
--- a/packages/0x.js/test/token_wrapper_test.ts
+++ b/packages/0x.js/test/token_wrapper_test.ts
@@ -1,6 +1,6 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils';
-import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { BigNumber } from '@0xproject/utils';
+import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as chai from 'chai';
import 'mocha';
import * as Web3 from 'web3';
diff --git a/packages/0x.js/test/utils/fill_scenarios.ts b/packages/0x.js/test/utils/fill_scenarios.ts
index 3aa9e483e..1a61487f4 100644
--- a/packages/0x.js/test/utils/fill_scenarios.ts
+++ b/packages/0x.js/test/utils/fill_scenarios.ts
@@ -1,5 +1,5 @@
-import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { BigNumber } from '@0xproject/utils';
+import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { SignedOrder, Token, ZeroEx } from '../../src';
import { artifacts } from '../../src/artifacts';
diff --git a/packages/abi-gen/src/utils.ts b/packages/abi-gen/src/utils.ts
index 764daa142..f407ae23d 100644
--- a/packages/abi-gen/src/utils.ts
+++ b/packages/abi-gen/src/utils.ts
@@ -10,7 +10,7 @@ export const utils = {
if (solType.match(trailingArrayRegex)) {
const arrayItemSolType = solType.replace(trailingArrayRegex, '');
const arrayItemTsType = utils.solTypeToTsType(paramKind, arrayItemSolType);
- const arrayTsType = `(${arrayItemTsType})[]`;
+ const arrayTsType = utils.isUnionType(arrayItemTsType) ? `Array<${arrayItemTsType}>` : `${arrayItemTsType}[]`;
return arrayTsType;
} else {
const solTypeRegexToTsType = [
@@ -37,6 +37,9 @@ export const utils = {
throw new Error(`Unknown Solidity type found: ${solType}`);
}
},
+ isUnionType(tsType: string): boolean {
+ return tsType === 'number|BigNumber';
+ },
log(...args: any[]): void {
console.log(...args); // tslint:disable-line:no-console
},