From b10cba600da44318f1d8246124c211ab92683626 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 13 Aug 2018 18:10:11 -0700 Subject: Refactor 0x.js to simply re-export it's own sub-dependencies rather then wrapping them in a ZeroEx object --- .../0x.js/src/schemas/zero_ex_config_schema.ts | 5 --- .../zero_ex_private_network_config_schema.ts | 35 ------------------ .../zero_ex_public_network_config_schema.ts | 43 ---------------------- 3 files changed, 83 deletions(-) delete mode 100644 packages/0x.js/src/schemas/zero_ex_config_schema.ts delete mode 100644 packages/0x.js/src/schemas/zero_ex_private_network_config_schema.ts delete mode 100644 packages/0x.js/src/schemas/zero_ex_public_network_config_schema.ts (limited to 'packages/0x.js/src/schemas') diff --git a/packages/0x.js/src/schemas/zero_ex_config_schema.ts b/packages/0x.js/src/schemas/zero_ex_config_schema.ts deleted file mode 100644 index a9c3c64fc..000000000 --- a/packages/0x.js/src/schemas/zero_ex_config_schema.ts +++ /dev/null @@ -1,5 +0,0 @@ -export const zeroExConfigSchema = { - id: '/ZeroExConfig', - oneOf: [{ $ref: '/ZeroExPrivateNetworkConfig' }, { $ref: '/ZeroExPublicNetworkConfig' }], - type: 'object', -}; diff --git a/packages/0x.js/src/schemas/zero_ex_private_network_config_schema.ts b/packages/0x.js/src/schemas/zero_ex_private_network_config_schema.ts deleted file mode 100644 index 378b86e77..000000000 --- a/packages/0x.js/src/schemas/zero_ex_private_network_config_schema.ts +++ /dev/null @@ -1,35 +0,0 @@ -export const zeroExPrivateNetworkConfigSchema = { - id: '/ZeroExPrivateNetworkConfig', - properties: { - networkId: { - type: 'number', - minimum: 1, - }, - gasPrice: { $ref: '/Number' }, - zrxContractAddress: { $ref: '/Address' }, - exchangeContractAddress: { $ref: '/Address' }, - erc20ProxyContractAddress: { $ref: '/Address' }, - erc721ProxyContractAddress: { $ref: '/Address' }, - orderWatcherConfig: { - type: 'object', - properties: { - pollingIntervalMs: { - type: 'number', - minimum: 0, - }, - numConfirmations: { - type: 'number', - minimum: 0, - }, - }, - }, - }, - type: 'object', - required: [ - 'networkId', - 'zrxContractAddress', - 'exchangeContractAddress', - 'erc20ProxyContractAddress', - 'erc721ProxyContractAddress', - ], -}; diff --git a/packages/0x.js/src/schemas/zero_ex_public_network_config_schema.ts b/packages/0x.js/src/schemas/zero_ex_public_network_config_schema.ts deleted file mode 100644 index f2a9a4d56..000000000 --- a/packages/0x.js/src/schemas/zero_ex_public_network_config_schema.ts +++ /dev/null @@ -1,43 +0,0 @@ -const networkNameToId: { [networkName: string]: number } = { - mainnet: 1, - ropsten: 3, - rinkeby: 4, - kovan: 42, - ganache: 50, -}; - -export const zeroExPublicNetworkConfigSchema = { - id: '/ZeroExPublicNetworkConfig', - properties: { - networkId: { - type: 'number', - enum: [ - networkNameToId.mainnet, - networkNameToId.ropsten, - networkNameToId.rinkeby, - networkNameToId.kovan, - networkNameToId.ganache, - ], - }, - gasPrice: { $ref: '/Number' }, - zrxContractAddress: { $ref: '/Address' }, - exchangeContractAddress: { $ref: '/Address' }, - erc20ProxyContractAddress: { $ref: '/Address' }, - erc721ProxyContractAddress: { $ref: '/Address' }, - orderWatcherConfig: { - type: 'object', - properties: { - pollingIntervalMs: { - type: 'number', - minimum: 0, - }, - numConfirmations: { - type: 'number', - minimum: 0, - }, - }, - }, - }, - type: 'object', - required: ['networkId'], -}; -- cgit v1.2.3