aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-02-15 07:23:06 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-02-15 07:25:30 +0800
commitdb52e877404b8f053bbdea823f1f6afd6eccecd1 (patch)
treef9f2478e74c993edf4b1ac9eec64ba33b850d43b
parent4d482438f554b50f3a5097d30ca37967b7aca994 (diff)
downloaddexon-sol-tools-db52e877404b8f053bbdea823f1f6afd6eccecd1.tar
dexon-sol-tools-db52e877404b8f053bbdea823f1f6afd6eccecd1.tar.gz
dexon-sol-tools-db52e877404b8f053bbdea823f1f6afd6eccecd1.tar.bz2
dexon-sol-tools-db52e877404b8f053bbdea823f1f6afd6eccecd1.tar.lz
dexon-sol-tools-db52e877404b8f053bbdea823f1f6afd6eccecd1.tar.xz
dexon-sol-tools-db52e877404b8f053bbdea823f1f6afd6eccecd1.tar.zst
dexon-sol-tools-db52e877404b8f053bbdea823f1f6afd6eccecd1.zip
Remove type-level validation
-rw-r--r--packages/0x.js/src/index.ts2
-rw-r--r--packages/0x.js/src/types.ts30
-rw-r--r--packages/0x.js/test/token_wrapper_test.ts1
-rw-r--r--packages/0x.js/test/utils/constants.ts6
-rw-r--r--packages/website/ts/containers/zero_ex_js_documentation.tsx2
5 files changed, 12 insertions, 29 deletions
diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts
index bb689f6dc..161945443 100644
--- a/packages/0x.js/src/index.ts
+++ b/packages/0x.js/src/index.ts
@@ -16,8 +16,6 @@ export {
ContractEventArgs,
Web3Provider,
ZeroExConfig,
- ZeroExPublicNetworkConfig,
- ZeroExPrivateNetworkConfig,
MethodOpts,
OrderTransactionOpts,
TransactionOpts,
diff --git a/packages/0x.js/src/types.ts b/packages/0x.js/src/types.ts
index 886beeaaa..0a3037258 100644
--- a/packages/0x.js/src/types.ts
+++ b/packages/0x.js/src/types.ts
@@ -195,26 +195,6 @@ export interface OrderStateWatcherConfig {
cleanupJobIntervalMs?: number;
}
-export interface ZeroExPublicNetworkConfig {
- networkId: 1 | 3 | 4 | 42 | 50;
- gasPrice?: BigNumber;
- exchangeContractAddress?: string;
- zrxContractAddress?: string;
- tokenRegistryContractAddress?: string;
- tokenTransferProxyContractAddress?: string;
- orderWatcherConfig?: OrderStateWatcherConfig;
-}
-
-export interface ZeroExPrivateNetworkConfig {
- networkId: number;
- gasPrice?: BigNumber;
- exchangeContractAddress: string;
- zrxContractAddress: string;
- tokenRegistryContractAddress: string;
- tokenTransferProxyContractAddress: string;
- orderWatcherConfig?: OrderStateWatcherConfig;
-}
-
/*
* networkId: The id of the underlying ethereum network your provider is connected to. (1-mainnet, 3-ropsten, 4-rinkeby, 42-kovan, 50-testrpc)
* gasPrice: Gas price to use with every transaction
@@ -224,7 +204,15 @@ export interface ZeroExPrivateNetworkConfig {
* tokenTransferProxyContractAddress: The address of the token transfer proxy contract to use
* orderWatcherConfig: All the configs related to the orderWatcher
*/
-export type ZeroExConfig = ZeroExPublicNetworkConfig | ZeroExPrivateNetworkConfig;
+export interface ZeroExConfig {
+ networkId: number;
+ gasPrice?: BigNumber;
+ exchangeContractAddress?: string;
+ zrxContractAddress?: string;
+ tokenRegistryContractAddress?: string;
+ tokenTransferProxyContractAddress?: string;
+ orderWatcherConfig?: OrderStateWatcherConfig;
+}
export type ArtifactContractName = 'ZRX' | 'TokenTransferProxy' | 'TokenRegistry' | 'Token' | 'Exchange' | 'EtherToken';
diff --git a/packages/0x.js/test/token_wrapper_test.ts b/packages/0x.js/test/token_wrapper_test.ts
index 6ecad4ccf..34ebe30c2 100644
--- a/packages/0x.js/test/token_wrapper_test.ts
+++ b/packages/0x.js/test/token_wrapper_test.ts
@@ -15,7 +15,6 @@ import {
TransferContractEventArgs,
ZeroEx,
ZeroExError,
- ZeroExPublicNetworkConfig,
} from '../src';
import { DoneCallback } from '../src/types';
diff --git a/packages/0x.js/test/utils/constants.ts b/packages/0x.js/test/utils/constants.ts
index bd7841feb..cf030259c 100644
--- a/packages/0x.js/test/utils/constants.ts
+++ b/packages/0x.js/test/utils/constants.ts
@@ -1,8 +1,8 @@
export const constants = {
NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
- ROPSTEN_NETWORK_ID: 3 as 3,
- KOVAN_NETWORK_ID: 42 as 42,
- TESTRPC_NETWORK_ID: 50 as 50,
+ ROPSTEN_NETWORK_ID: 3,
+ KOVAN_NETWORK_ID: 42,
+ TESTRPC_NETWORK_ID: 50,
KOVAN_RPC_URL: 'https://kovan.infura.io/',
ROPSTEN_RPC_URL: 'https://ropsten.infura.io/',
ZRX_DECIMALS: 18,
diff --git a/packages/website/ts/containers/zero_ex_js_documentation.tsx b/packages/website/ts/containers/zero_ex_js_documentation.tsx
index 018b99f8d..96c8c257d 100644
--- a/packages/website/ts/containers/zero_ex_js_documentation.tsx
+++ b/packages/website/ts/containers/zero_ex_js_documentation.tsx
@@ -101,8 +101,6 @@ const docsInfoConfig: DocsInfoConfig = {
'ApprovalContractEventArgs',
'TokenContractEventArgs',
'ZeroExConfig',
- 'ZeroExPublicNetworkConfig',
- 'ZeroExPrivateNetworkConfig',
'TransactionReceiptWithDecodedLogs',
'LogWithDecodedArgs',
'EtherTokenEvents',